Skip to content

Commit

Permalink
SetForked: explain where can, leave TODOs in other places to evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Dec 5, 2024
1 parent 127ff91 commit 460992d
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testitRepoPolicyAlways() throws Exception {

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?
verifier.deleteArtifacts("org.apache.maven.its.mng4745");
verifier.addCliArgument("-s");
verifier.addCliArgument("settings.xml");
Expand Down Expand Up @@ -84,7 +84,7 @@ public void testitRepoPolicyNever() throws Exception {

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?
verifier.deleteArtifacts("org.apache.maven.its.mng4745");
verifier.addCliArgument("-s");
verifier.addCliArgument("settings.xml");
Expand Down Expand Up @@ -119,7 +119,7 @@ public void testitForceUpdate() throws Exception {

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?
verifier.deleteArtifacts("org.apache.maven.its.mng4745");
verifier.addCliArgument("-U");
verifier.addCliArgument("-s");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void testit() throws Exception {
File testDir = extractResources("/mng-4936");

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setForkJvm(true);
verifier.setForkJvm(true); // maven.ext.class.path is not unloaded
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.addCliArgument("-Dmaven.ext.class.path=spy-0.1.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testCorrectModuleFails() throws Exception {
spy.execute();

Verifier verifier = newVerifier(testDir.getAbsolutePath() + "/project");
verifier.setForkJvm(true);
verifier.setForkJvm(true); // maven.ext.class.path used
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.addCliArgument("-Dmaven.ext.class.path=../spy/target/event-spy-0.0.1-SNAPSHOT.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ public void testCustomLifecycle() throws Exception {

// run custom "test-only" build phase
verifier = newVerifier(projectDir.getAbsolutePath());
verifier = newVerifier(projectDir.getAbsolutePath());
verifier.setLogFileName("test-only-log.txt");
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?
verifier.addCliArgument("-X");
verifier.addCliArgument("test-only");
verifier.execute();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void testRunCustomPomWithDot() throws Exception {
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.addCliArgument("-f");
verifier.addCliArgument("./pom.xml");
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?
verifier.addCliArgument("verify");
verifier.execute();
verifier.verifyErrorFreeLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testitShouldResolveTheDependenciesWithBuildConsumer() throws Excepti

Verifier verifier = newVerifier(testDir.getAbsolutePath(), false);
verifier.setAutoclean(false);
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?

verifier.addCliArgument("-Drevision=1.2");
verifier.addCliArgument("-Dmaven.consumerpom=true");
Expand All @@ -88,7 +88,7 @@ public void testitShouldResolveTheDependenciesWithBuildConsumer() throws Excepti

verifier = newVerifier(testDir.getAbsolutePath(), false);
verifier.setAutoclean(false);
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?

verifier.addCliArgument("-Drevision=1.2");
verifier.addCliArgument("-pl");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected void runWithLineEndings(String lineEndings) throws Exception {
Verifier verifier = newVerifier(baseDir.getAbsolutePath());
verifier.addCliArgument(
"-Dexpression.outputFile=" + new File(baseDir, "expression.properties").getAbsolutePath());
verifier.setForkJvm(true);
verifier.setForkJvm(true); // custom .mvn/jvm.config
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testRelativePath() throws Exception {
File testDir = extractResources("/mng-6330-relative-path");

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?

try {
verifier.addCliArgument("validate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testit() throws Exception {
File testDir = extractResources("/mng-6558");

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setForkJvm(true);
verifier.setForkJvm(true); // maven.ext.class.path used
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.addCliArgument("-Dmaven.ext.class.path=spy-0.1.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void testLeakyModel() throws Exception {
File testDir = extractResources("/mng-7228-leaky-model");

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setForkJvm(true);
verifier.setForkJvm(true); // TODO: why?

verifier.addCliArgument("-e");
verifier.addCliArgument("-s");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ protected void tearDown() throws Exception {

private void performTest(/* nullable */ final String transport, final String logSnippet) throws Exception {
Verifier verifier = newVerifier(projectDir.getAbsolutePath());
verifier.setForkJvm(true);

Map<String, String> properties = new HashMap<>();
properties.put("@port@", Integer.toString(port));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public void testDeadlock() throws IOException, VerificationException {

final File consumerDir = new File(rootDir, "consumer");
final Verifier consumerVerifier = newVerifier(consumerDir.getAbsolutePath());
consumerVerifier.setForkJvm(true);
;
consumerVerifier.setForkJvm(true); // TODO: why?

consumerVerifier.addCliArgument("-T2");
consumerVerifier.addCliArgument("package");
consumerVerifier.execute();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public void testWithExtensionsXmlCoreExtensionsFound() throws Exception {

verifier = newVerifier(testDir.getAbsolutePath());
ItUtils.setUserHome(verifier, Paths.get(testDir.toPath().toString(), "home-extensions-xml"));
verifier.setForkJvm(true);

verifier.addCliArgument("validate");
verifier.execute();
Expand Down Expand Up @@ -71,7 +70,6 @@ public void testWithLibExtCoreExtensionsFound() throws Exception {

verifier = newVerifier(testDir.getAbsolutePath());
ItUtils.setUserHome(verifier, Paths.get(testDir.toPath().toString(), "home-lib-ext"));
verifier.setForkJvm(true);
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyTextInLog("[INFO] Extension loaded!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ void testFileLockingAndSnapshots() throws Exception {
File testDir = extractResources("/mng-7819-file-locking-with-snapshots");

Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setForkJvm(true);

// produce required precondition state: local repository must not have any of the org.apache.maven.its.mng7819
// artifacts
Expand Down

0 comments on commit 460992d

Please sign in to comment.