diff --git a/src/it/java/org/eclipse/microprofile/starter/TestMatrixTest.java b/src/it/java/org/eclipse/microprofile/starter/TestMatrixTest.java index 7081b8fd..ff49885d 100644 --- a/src/it/java/org/eclipse/microprofile/starter/TestMatrixTest.java +++ b/src/it/java/org/eclipse/microprofile/starter/TestMatrixTest.java @@ -101,6 +101,9 @@ public void testRuntime(String supportedServer, String artifactId, SpecSelection File runLogA = null; File runLogB = null; + // Workaround https://github.com/OpenLiberty/ci.gradle/issues/841 by using a single-thread for Liberty + Gradle + int threadPoolSize = (supportedServer.equalsIgnoreCase("LIBERTY") && buildTool.equals(BuildTool.GRADLE)) ? 1 : 2; + try { // Cleanup cleanWorkspace(artifactId); @@ -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(2); + 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));