diff --git a/muted-tests.yml b/muted-tests.yml index 0f0c0b6f329b3..d63535876a908 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -489,21 +489,12 @@ tests: - class: org.elasticsearch.search.CCSDuelIT method: testTermsAggsWithProfile issue: https://github.com/elastic/elasticsearch/issues/132880 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testFetchMany - issue: https://github.com/elastic/elasticsearch/issues/132948 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testFetch - issue: https://github.com/elastic/elasticsearch/issues/132956 - class: org.elasticsearch.cluster.ClusterInfoServiceIT method: testMaxQueueLatenciesInClusterInfo issue: https://github.com/elastic/elasticsearch/issues/132957 - class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT method: test {p0=search/400_synthetic_source/_doc_count} issue: https://github.com/elastic/elasticsearch/issues/132965 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testSyntheticSourceWithTranslogSnapshot - issue: https://github.com/elastic/elasticsearch/issues/132964 - class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT method: test {p0=search/160_exists_query/Test exists query on unmapped float field} issue: https://github.com/elastic/elasticsearch/issues/132984 @@ -594,15 +585,9 @@ tests: - class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT method: testCCSClusterDetailsWhereAllShardsSkippedInCanMatch issue: https://github.com/elastic/elasticsearch/issues/133370 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testSyntheticSourceMany - issue: https://github.com/elastic/elasticsearch/issues/133394 - class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT method: test {p0=search.vectors/42_knn_search_int4_flat/kNN search with filter} issue: https://github.com/elastic/elasticsearch/issues/133420 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testSyntheticSourceInNestedObject - issue: https://github.com/elastic/elasticsearch/issues/133426 - class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT method: test {p0=search/160_exists_query/Test exists query on date field in empty index} issue: https://github.com/elastic/elasticsearch/issues/133439 @@ -627,9 +612,6 @@ tests: - class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT method: testStopQueryLocal issue: https://github.com/elastic/elasticsearch/issues/133481 -- class: org.elasticsearch.index.mapper.LongFieldMapperTests - method: testSyntheticSource - issue: https://github.com/elastic/elasticsearch/issues/133496 - class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT method: testEsqlSource issue: https://github.com/elastic/elasticsearch/issues/132601 diff --git a/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java index e531034f0725e..07a352c1fde96 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java @@ -103,6 +103,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()) { @@ -111,7 +114,8 @@ protected Number randomNumber() { if (randomBoolean()) { return randomDouble(); } - 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); } public void testFetchCoerced() throws IOException {