Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ private void validateGroups(int... expectedGroupSizes) throws IOException, Inter
Thread.sleep(QueryInsightsSettings.QUERY_RECORD_QUEUE_DRAIN_INTERVAL.millis());

List<Map<String, Object>> 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);
Expand Down Expand Up @@ -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")
Expand Down
Loading