Skip to content

Commit bfc6760

Browse files
committed
fix concurrency in tests
1 parent a38bcb5 commit bfc6760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/info/unterrainer/commons/rdbutils/ManualLockingTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public void persistingAndReadingEntityWorks() throws InterruptedException {
4242
.editedOn(LocalDateTime.now())
4343
.build());
4444

45-
ExecutorService executorService = new ThreadPoolExecutor(1, 200, 0L, TimeUnit.MILLISECONDS,
45+
ExecutorService executorService = new ThreadPoolExecutor(200, 200, 100L, TimeUnit.MILLISECONDS,
4646
new LinkedBlockingQueue<Runnable>());
47+
((ThreadPoolExecutor) executorService).allowCoreThreadTimeOut(true);
4748
executorService.execute(() -> selectFirstTestEntityPessimistically());
4849
executorService.execute(() -> selectFirstTestEntityPessimistically());
4950
executorService.shutdown();

0 commit comments

Comments
 (0)