Skip to content

Commit df71ccf

Browse files
authored
Don't run FieldExtractorIT#testScaledFloat using JDK17 (#123199)
1 parent 0fee331 commit df71ccf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/FieldExtractorTestCase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ public void testFloat() throws IOException {
221221
}
222222

223223
public void testScaledFloat() throws IOException {
224+
// Running this on 17 when nodes in cluster run JDK >17 triggers an assert due to a mismatch
225+
// of results produced by Double#toString for some specific numbers.
226+
// See https://github.com/elastic/elasticsearch/issues/122984.
227+
assumeTrue("JDK version greater than 17", Runtime.version().feature() > 17);
228+
224229
double value = randomBoolean() ? randomDoubleBetween(-Double.MAX_VALUE, Double.MAX_VALUE, true) : randomFloat();
225230
// Scale factors less than about 5.6e-309 will result in NaN (due to 1/scaleFactor being infinity)
226231
double scalingFactor = randomDoubleBetween(1e-308, Double.MAX_VALUE, false);

0 commit comments

Comments
 (0)