Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public void testLongIndexingCoercesIntoRange() throws Exception {
assertThat(doc.rootDoc().getFields("field"), hasSize(1));
}

// This is the biggest long that double can represent exactly
public static final long MAX_SAFE_LONG_FOR_DOUBLE = 1L << 53;

@Override
protected Number randomNumber() {
if (randomBoolean()) {
Expand All @@ -112,8 +115,8 @@ protected Number randomNumber() {
if (randomBoolean()) {
return randomDouble();
}
assumeFalse("https://github.com/elastic/elasticsearch/issues/70585", true);
return randomDoubleBetween(Long.MIN_VALUE, Long.MAX_VALUE, true);
// TODO: increase the range back to full LONG range once https://github.com/elastic/elasticsearch/issues/132893 is fixed
return randomDoubleBetween(-MAX_SAFE_LONG_FOR_DOUBLE, MAX_SAFE_LONG_FOR_DOUBLE, true);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/70585")
Expand Down