Skip to content

Commit

Permalink
Variable thread pool size
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Kurz <[email protected]>
  • Loading branch information
scottkurz committed Jul 18, 2023
1 parent 749a56c commit 98a1df8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public void testRuntime(String supportedServer, String artifactId, SpecSelection
File buildLogB = null;
File runLogA = null;
File runLogB = null;

// Workaround https:/OpenLiberty/ci.gradle/issues/841
final int threadPoolSize = supportedServer.equalsIgnoreCase("LIBERTY") ? 1 : 2;

try {
// Cleanup
Expand Down Expand Up @@ -134,7 +137,7 @@ public void testRuntime(String supportedServer, String artifactId, SpecSelection
if (specSelection.hasServiceB) {
buildLogB = new File(directoryB.getAbsolutePath() + File.separator + directoryB.getName() + "-build.log");
}
ExecutorService buildService = Executors.newFixedThreadPool(1); // Workaround LGP issues
ExecutorService buildService = Executors.newFixedThreadPool(threadPoolSize);
buildService.submit(new Commands.ProcessRunner(directoryA, buildLogA, buildCmdRunCmdWebAddr[0], 20));
if (specSelection.hasServiceB) {
buildService.submit(new Commands.ProcessRunner(directoryB, buildLogB, buildCmdRunCmd[0], 20));
Expand Down

0 comments on commit 98a1df8

Please sign in to comment.