Skip to content

Commit

Permalink
Merge pull request #273 from imonteroperez/override-fork-count
Browse files Browse the repository at this point in the history
Allow to override forkCount value
  • Loading branch information
imonteroperez authored Mar 11, 2021
2 parents df60aee + c47dad0 commit bb4f15c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,9 @@ private TestExecutionResult testPluginAgainst(MavenCoordinates coreCoordinates,
}

List<String> args = new ArrayList<>();
args.add("--define=forkCount=1");

Map<String, String> userProperties = mconfig.userProperties;
args.add(String.format("--define=forkCount=%s",userProperties.containsKey("forkCount") ? userProperties.get("forkCount") : "1"));
args.add("hpi:resolve-test-dependencies");
args.add("hpi:test-hpl");
args.add("surefire:test");
Expand All @@ -554,7 +556,7 @@ private TestExecutionResult testPluginAgainst(MavenCoordinates coreCoordinates,
pcth.runBeforeExecution(forExecutionHooks);
args = (List<String>)forExecutionHooks.get("args");
Set<String> types = new HashSet<>((List<String>) forExecutionHooks.get("types"));
mconfig.userProperties.put("types", String.join(",", types));
userProperties.put("types", String.join(",", types));

// Execute with tests
runner.run(mconfig, pluginCheckoutDir, buildLogFile, args.toArray(new String[args.size()]));
Expand Down

0 comments on commit bb4f15c

Please sign in to comment.