Skip to content

Commit fdad19e

Browse files
committed
[bugfix/test] Limit the number of hardware threads to a max of 16 for
these tests. I have observed deadlocks on my machine which has 128 hardware threads. We should revisit this later...
1 parent 7691d1a commit fdad19e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exist-core/src/test/java/org/exist/collections/ConcurrencyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class ConcurrencyTest {
5353
@ClassRule
5454
public static final ExistXmldbEmbeddedServer existEmbeddedServer = new ExistXmldbEmbeddedServer(false, true, true);
5555

56-
private static int CONCURRENT_THREADS = Runtime.getRuntime().availableProcessors() * 3;
56+
private static int CONCURRENT_THREADS = Math.min(16, Runtime.getRuntime().availableProcessors() * 3);
5757
private static final int DOC_COUNT = CONCURRENT_THREADS * 10;
5858

5959
private static final int QUERY_COUNT = 20;

extensions/indexes/lucene/src/test/java/org/exist/indexing/lucene/ConcurrencyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class ConcurrencyTest {
6464
@ClassRule
6565
public static final ExistXmldbEmbeddedServer existEmbeddedServer = new ExistXmldbEmbeddedServer(false, true, true);
6666

67-
private static int CONCURRENT_THREADS = Runtime.getRuntime().availableProcessors() * 3;
67+
private static int CONCURRENT_THREADS = Math.min(16, Runtime.getRuntime().availableProcessors() * 3);
6868

6969
private static Collection test;
7070

0 commit comments

Comments
 (0)