From 56076c53daee124071ac237e7cbdeeed08854373 Mon Sep 17 00:00:00 2001 From: mxtartaglia Date: Thu, 15 Feb 2024 11:12:03 -0300 Subject: [PATCH] 11540: Reduce the number of thread consumed by the test and check more spaced timeouts Signed-off-by: mxtartaglia --- .../test/internal/fixtures/ConcurrentTestSupportTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform-sdk/swirlds-base/src/test/java/com/swirlds/base/test/internal/fixtures/ConcurrentTestSupportTest.java b/platform-sdk/swirlds-base/src/test/java/com/swirlds/base/test/internal/fixtures/ConcurrentTestSupportTest.java index 5927b6fa4ff4..0d7651399472 100644 --- a/platform-sdk/swirlds-base/src/test/java/com/swirlds/base/test/internal/fixtures/ConcurrentTestSupportTest.java +++ b/platform-sdk/swirlds-base/src/test/java/com/swirlds/base/test/internal/fixtures/ConcurrentTestSupportTest.java @@ -63,7 +63,7 @@ void testMultipleTasksThatRunsShort() { @Test void testATaskThatRunsTooLong() { // given - try (ConcurrentTestSupport concurrentTestSupport = new ConcurrentTestSupport(Duration.ofSeconds(1))) { + try (ConcurrentTestSupport concurrentTestSupport = new ConcurrentTestSupport(Duration.ofMillis(500))) { final Runnable runnable = () -> sleep(1_010); // then @@ -76,7 +76,7 @@ void testATaskThatRunsTooLong() { void testMultipleTasksThatRunsTooLong() { // given try (ConcurrentTestSupport concurrentTestSupport = new ConcurrentTestSupport(Duration.ofSeconds(1)); ) { - final List runnables = IntStream.range(0, 50) + final List runnables = IntStream.range(0, 10) .mapToObj(i -> (Runnable) () -> sleep(2000)) .toList();