Skip to content

Commit ee99fc4

Browse files
authored
Mute cranky eval tests for convert functions (#103609)
The evalVector method on convert functions catches exceptions, including CircuitBreakerException, and emit nulls instead. This was fixed in 8.12. Mute the corresponding tests for convert functions.
1 parent 978db27 commit ee99fc4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.elasticsearch.test.ESTestCase;
3333
import org.elasticsearch.xpack.esql.evaluator.EvalMapper;
3434
import org.elasticsearch.xpack.esql.expression.function.scalar.conditional.Greatest;
35+
import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
3536
import org.elasticsearch.xpack.esql.expression.function.scalar.nulls.Coalesce;
3637
import org.elasticsearch.xpack.esql.optimizer.FoldNull;
3738
import org.elasticsearch.xpack.esql.planner.Layout;
@@ -279,6 +280,11 @@ public final void testEvaluateBlockWithNullsFloating() {
279280
*/
280281
public final void testCrankyEvaluateBlockWithoutNulls() {
281282
assumeTrue("sometimes the cranky breaker silences warnings, just skip these cases", testCase.getExpectedWarnings() == null);
283+
// See https://github.com/elastic/elasticsearch/issues/102996#issuecomment-1860198434
284+
assumeTrue(
285+
"Convert functions catch CircuitBreakerExceptions in evalVector and emit null instead. Fixed in 8.12",
286+
(buildFieldExpression(testCase) instanceof AbstractConvertFunction) == false
287+
);
282288
try {
283289
testEvaluateBlock(driverContext().blockFactory(), crankyContext(), false, false);
284290
} catch (CircuitBreakingException ex) {
@@ -297,6 +303,11 @@ public final void testCrankyEvaluateBlockWithoutNulls() {
297303
*/
298304
public final void testCrankyEvaluateBlockWithoutNullsFloating() {
299305
assumeTrue("sometimes the cranky breaker silences warnings, just skip these cases", testCase.getExpectedWarnings() == null);
306+
// See https://github.com/elastic/elasticsearch/issues/102996#issuecomment-1860198434
307+
assumeTrue(
308+
"Convert functions catch CircuitBreakerExceptions in evalVector and emit null instead. Fixed in 8.12",
309+
(buildFieldExpression(testCase) instanceof AbstractConvertFunction) == false
310+
);
300311
try {
301312
testEvaluateBlock(driverContext().blockFactory(), crankyContext(), false, true);
302313
} catch (CircuitBreakingException ex) {

0 commit comments

Comments
 (0)