diff --git a/core-java-concurrency/src/test/java/com/baeldung/concurrent/synchronize/BaeldungSychronizedBlockTest.java b/core-java-concurrency/src/test/java/com/baeldung/concurrent/synchronize/BaeldungSychronizedBlockTest.java index 1f8e8d681a..9c56fa64be 100644 --- a/core-java-concurrency/src/test/java/com/baeldung/concurrent/synchronize/BaeldungSychronizedBlockTest.java +++ b/core-java-concurrency/src/test/java/com/baeldung/concurrent/synchronize/BaeldungSychronizedBlockTest.java @@ -18,7 +18,7 @@ public class BaeldungSychronizedBlockTest { IntStream.range(0, 1000) .forEach(count -> service.submit(synchronizedBlocks::performSynchronisedTask)); - service.awaitTermination(100, TimeUnit.MILLISECONDS); + service.awaitTermination(500, TimeUnit.MILLISECONDS); assertEquals(1000, synchronizedBlocks.getCount()); } @@ -29,7 +29,7 @@ public class BaeldungSychronizedBlockTest { IntStream.range(0, 1000) .forEach(count -> service.submit(BaeldungSynchronizedBlocks::performStaticSyncTask)); - service.awaitTermination(100, TimeUnit.MILLISECONDS); + service.awaitTermination(500, TimeUnit.MILLISECONDS); assertEquals(1000, BaeldungSynchronizedBlocks.getStaticCount()); }