From 31fdce420beabee6a9657945165e32ebc9a669ae Mon Sep 17 00:00:00 2001 From: Kondaka Date: Mon, 27 Nov 2023 12:04:04 -0800 Subject: [PATCH] increased wait times in aggregate processor test Signed-off-by: Kondaka --- .../aggregate/AggregateProcessorIT.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/data-prepper-plugins/aggregate-processor/src/test/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorIT.java b/data-prepper-plugins/aggregate-processor/src/test/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorIT.java index f0a8c5b76e..5a5f5bae49 100644 --- a/data-prepper-plugins/aggregate-processor/src/test/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorIT.java +++ b/data-prepper-plugins/aggregate-processor/src/test/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorIT.java @@ -159,7 +159,7 @@ void aggregateWithNoConcludingGroupsReturnsExpectedResult() throws InterruptedEx }); } - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); assertThat(aggregatedResult.size(), equalTo(NUM_UNIQUE_EVENTS_PER_BATCH)); @@ -198,7 +198,7 @@ void aggregateWithConcludingGroupsOnceReturnsExpectedResult() throws Interrupted }); } - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); assertThat(aggregatedResult.size(), equalTo(NUM_UNIQUE_EVENTS_PER_BATCH)); @@ -249,7 +249,7 @@ void aggregateWithPutAllActionAndCondition() throws InterruptedException { }); } - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); assertThat(aggregatedResult.size(), equalTo(NUM_UNIQUE_EVENTS_PER_BATCH/2)); @@ -320,7 +320,7 @@ void aggregateWithRateLimiterAction() throws InterruptedException { }); } - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); // Expect less number of events to be received, because of rate limiting @@ -355,7 +355,7 @@ void aggregateWithRateLimiterActionNoDrops() throws InterruptedException { }); } - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); // Expect all events to be received even with rate limiting because no events are dropped @@ -385,7 +385,7 @@ void aggregateWithCountAggregateAction() throws InterruptedException, NoSuchFiel } Thread.sleep(GROUP_DURATION_FOR_ONLY_SINGLE_CONCLUDE * 1000); - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); Collection> results = objectUnderTest.doExecute(new ArrayList>()); @@ -431,7 +431,7 @@ void aggregateWithCountAggregateActionWithCondition() throws InterruptedExceptio } Thread.sleep(GROUP_DURATION_FOR_ONLY_SINGLE_CONCLUDE * 1000); - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); Collection> results = objectUnderTest.doExecute(new ArrayList>()); @@ -491,7 +491,7 @@ void aggregateWithHistogramAggregateAction() throws InterruptedException, NoSuch } Thread.sleep(GROUP_DURATION_FOR_ONLY_SINGLE_CONCLUDE * 1000); - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); Collection> results = objectUnderTest.doExecute(new ArrayList>()); @@ -545,7 +545,7 @@ void aggregateWithTailSamplerAction(final int testPercent) throws InterruptedExc }); } Thread.sleep(GROUP_DURATION_FOR_ONLY_SINGLE_CONCLUDE * 1000); - boolean allThreadsFinished = countDownLatch.await(10L, TimeUnit.SECONDS); + boolean allThreadsFinished = countDownLatch.await(20L, TimeUnit.SECONDS); assertThat(allThreadsFinished, equalTo(true)); List errorEventList = eventBatch.stream().map(Record::getData).filter(event -> { Event ev = ((Event)event);