Skip to content

Commit e0b4471

Browse files
committed
ESQL: Make a test consistent (elastic#127234)
Had to sort. Relates to elastic#127199
1 parent 40000c7 commit e0b4471

File tree

2 files changed

+9
-1
lines changed
  • x-pack/plugin/esql/qa

2 files changed

+9
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ private void testPushQuery(String value, String esqlQuery, String luceneQuery, b
124124
matcher = matcher.item("ProjectOperator").item("ExchangeSinkOperator");
125125
assertMap(sig, matcher);
126126
}
127-
case "node_reduce" -> assertMap(sig, matchesList().item("ExchangeSourceOperator").item("ExchangeSinkOperator"));
127+
case "node_reduce" -> {
128+
if (sig.contains("LimitOperator")) {
129+
// TODO figure out why this is sometimes here and sometimes not
130+
assertMap(sig, matchesList().item("ExchangeSourceOperator").item("LimitOperator").item("ExchangeSinkOperator"));
131+
} else {
132+
assertMap(sig, matchesList().item("ExchangeSourceOperator").item("ExchangeSinkOperator"));
133+
}
134+
}
128135
case "final" -> assertMap(
129136
sig,
130137
matchesList().item("ExchangeSourceOperator").item("LimitOperator").item("ProjectOperator").item("OutputOperator")

x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,7 @@ mvStringNotEquals
23312331
FROM mv_text
23322332
| WHERE message != "Connected to 10.1.0.2"
23332333
| KEEP @timestamp, message
2334+
| SORT @timestamp ASC
23342335
;
23352336
warning:Line 2:9: evaluation of [message != \"Connected to 10.1.0.2\"] failed, treating result as null. Only first 20 failures recorded.
23362337
warning:Line 2:9: java.lang.IllegalArgumentException: single-value function encountered multi-value

0 commit comments

Comments
 (0)