From 057ca00a6d09811078ee9174584bc3dfabfe16d1 Mon Sep 17 00:00:00 2001 From: Emily Guo <35637792+LilyCaroline17@users.noreply.github.com> Date: Fri, 17 Oct 2025 13:49:29 -0700 Subject: [PATCH] increase group it retries to 20 Signed-off-by: Emily Guo <35637792+LilyCaroline17@users.noreply.github.com> --- .../service/grouper/MinMaxQueryGrouperBySimilarityIT.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java index ff585126..a33602a1 100644 --- a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java +++ b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java @@ -131,8 +131,8 @@ private void validateGroups(int... expectedGroupSizes) throws IOException, Inter Thread.sleep(QueryInsightsSettings.QUERY_RECORD_QUEUE_DRAIN_INTERVAL.millis()); List> topQueries = null; - // run ten times to make sure the records are drained to the top queries services - for (int i = 0; i < 10; i++) { + // run twenty times to make sure the records are drained to the top queries services + for (int i = 0; i < 20; i++) { // Parse the response to validate group structure Request request = new Request("GET", "/_insights/top_queries?type=latency"); Response response = client().performRequest(request); @@ -175,12 +175,12 @@ private void validateGroups(int... expectedGroupSizes) throws IOException, Inter return; } - if (i < 9) { + if (i < 19) { Thread.sleep(QueryInsightsSettings.QUERY_RECORD_QUEUE_DRAIN_INTERVAL.millis()); } } fail( - "Failed to validate groups after 10 attempts. Expected groups: " + "Failed to validate groups after 20 attempts. Expected groups: " + Arrays.toString(expectedGroupSizes) + ", but got: " + (topQueries != null ? topQueries.size() : "null")