Skip to content

Commit

Permalink
Testsuite improvements - make the tests repeateable without clean tar…
Browse files Browse the repository at this point in the history
…get/ dir

Currently some of the tests fail when they are run repeatedly without
running the clean task. The core reason usually is that by default the
provisining is skipped when the server directory already exists, and so
the code that was expected to be executed is not executed.
  • Loading branch information
TomasHofman committed Dec 3, 2024
1 parent fd6ff18 commit d60014e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;

import org.apache.maven.plugin.Mojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -42,7 +43,7 @@ public void testBootableRootPackage() throws Exception {
String deploymentName = "ROOT.war";
Path rootWar = AbstractWildFlyMojoTest.getBaseDir().resolve("target").resolve(deploymentName);
Path testWar = AbstractWildFlyMojoTest.getBaseDir().resolve("target").resolve("test.war");
Files.copy(testWar, rootWar);
Files.copy(testWar, rootWar, StandardCopyOption.REPLACE_EXISTING);
Files.delete(testWar);
packageMojo.execute();
String[] layers = { "jaxrs-server" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<record-provisioning-state>true</record-provisioning-state>
<provisioning-dir>packaged-bootable-server</provisioning-dir>
<bootable-jar>true</bootable-jar>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
</extra-server-content-dirs>
<record-provisioning-state>true</record-provisioning-state>
<provisioning-dir>packaged-invalid-dep-server</provisioning-dir>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
</extra-server-content-dirs>
<record-provisioning-state>true</record-provisioning-state>
<provisioning-dir>packaged-invalid-dep2-server</provisioning-dir>
<overwrite-provisioned-server>true</overwrite-provisioned-server>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit d60014e

Please sign in to comment.