diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java index bf1b5738a306b..556aae7dab69d 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java @@ -254,6 +254,7 @@ private void testEvaluate(boolean readFloating) { assertWarnings(testCase.getExpectedWarnings()); } } + private Object toJavaObjectUnsignedLongAware(Block block, int position) { Object result; result = toJavaObject(block, position); @@ -263,6 +264,7 @@ private Object toJavaObjectUnsignedLongAware(Block block, int position) { } return result; } + /** * Evaluates a {@link Block} of values, all copied from the input pattern, read directly from the page. *

@@ -526,7 +528,8 @@ public final void testFold() { if (testCase.expectedType == DataTypes.UNSIGNED_LONG && result != null) { result = NumericUtils.unsignedLongAsBigInteger((Long) result); } - assertThat(result, testCase.getMatcher()); if (testCase.getExpectedWarnings() != null) { + assertThat(result, testCase.getMatcher()); + if (testCase.getExpectedWarnings() != null) { assertWarnings(testCase.getExpectedWarnings()); } }