Skip to content

Commit

Permalink
Mute cranky eval tests for convert functions (#103609)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alex-spies committed Dec 20, 2023
1 parent 978db27 commit ee99fc4
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -32,6 +32,7 @@
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.xpack.esql.evaluator.EvalMapper;
import org.elasticsearch.xpack.esql.expression.function.scalar.conditional.Greatest;
import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
import org.elasticsearch.xpack.esql.expression.function.scalar.nulls.Coalesce;
import org.elasticsearch.xpack.esql.optimizer.FoldNull;
import org.elasticsearch.xpack.esql.planner.Layout;
Expand Down Expand Up @@ -279,6 +280,11 @@ public final void testEvaluateBlockWithNullsFloating() {
*/
public final void testCrankyEvaluateBlockWithoutNulls() {
assumeTrue("sometimes the cranky breaker silences warnings, just skip these cases", testCase.getExpectedWarnings() == null);
// See https://github.com/elastic/elasticsearch/issues/102996#issuecomment-1860198434
assumeTrue(
"Convert functions catch CircuitBreakerExceptions in evalVector and emit null instead. Fixed in 8.12",
(buildFieldExpression(testCase) instanceof AbstractConvertFunction) == false
);
try {
testEvaluateBlock(driverContext().blockFactory(), crankyContext(), false, false);
} catch (CircuitBreakingException ex) {
Expand All @@ -297,6 +303,11 @@ public final void testCrankyEvaluateBlockWithoutNulls() {
*/
public final void testCrankyEvaluateBlockWithoutNullsFloating() {
assumeTrue("sometimes the cranky breaker silences warnings, just skip these cases", testCase.getExpectedWarnings() == null);
// See https://github.com/elastic/elasticsearch/issues/102996#issuecomment-1860198434
assumeTrue(
"Convert functions catch CircuitBreakerExceptions in evalVector and emit null instead. Fixed in 8.12",
(buildFieldExpression(testCase) instanceof AbstractConvertFunction) == false
);
try {
testEvaluateBlock(driverContext().blockFactory(), crankyContext(), false, true);
} catch (CircuitBreakingException ex) {
Expand Down

0 comments on commit ee99fc4

Please sign in to comment.