Skip to content

Commit 2f6c97b

Browse files
committed
Relax profiles assertions (elastic#123923)
If the final driver is woken up before the exchange buffer is finished, there will be two sleeps in its profile instead of one. We don't need these assertions to be so precise. This change relaxes the assertions to allow reduce operators to have more than one sleep.
1 parent 4c01c19 commit 2f6c97b

File tree

1 file changed

+1
-9
lines changed
  • x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node

1 file changed

+1
-9
lines changed

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/RestEsqlIT.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void testForceSleepsProfile() throws IOException {
504504
String description = p.get("description").toString();
505505
switch (description) {
506506
case "data" -> assertMap(sleeps, matchesMap().entry("counts", Map.of()).entry("first", List.of()).entry("last", List.of()));
507-
case "node_reduce" -> {
507+
case "node_reduce", "final" -> {
508508
assertMap(sleeps, matchesMap().entry("counts", matchesMap().entry("exchange empty", greaterThan(0))).extraOk());
509509
@SuppressWarnings("unchecked")
510510
List<Map<String, Object>> first = (List<Map<String, Object>>) sleeps.get("first");
@@ -517,14 +517,6 @@ public void testForceSleepsProfile() throws IOException {
517517
assertMap(s, sleepMatcher);
518518
}
519519
}
520-
case "final" -> {
521-
assertMap(
522-
sleeps,
523-
matchesMap().entry("counts", matchesMap().entry("exchange empty", 1))
524-
.entry("first", List.of(sleepMatcher))
525-
.entry("last", List.of(sleepMatcher))
526-
);
527-
}
528520
default -> throw new IllegalArgumentException("unknown task: " + description);
529521
}
530522
}

0 commit comments

Comments
 (0)