Skip to content

Commit a7d5302

Browse files
committed
Limit thread count in integration tests to 9.
1 parent de119e6 commit a7d5302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/imsweb/staging/IntegrationUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ private IntegrationUtils() {
6363
}
6464

6565
public static IntegrationResult processSchemaSelection(final Staging staging, String fileName, InputStream is) throws IOException, InterruptedException {
66-
// initialize the threads pool
67-
int n = Runtime.getRuntime().availableProcessors() + 1;
66+
// initialize the threads pool (don't use more than 9 threads)
67+
int n = Math.min(9, Runtime.getRuntime().availableProcessors() + 1);
6868
ExecutorService pool = new ThreadPoolExecutor(n, n, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<Runnable>(1000), new CallerRunsPolicy());
6969

7070
Stopwatch stopwatch = Stopwatch.createStarted();

0 commit comments

Comments
 (0)