Skip to content

Commit e034ede

Browse files
committed
Use safe double range to test long mapper (#133423)
Until #132893 is fixed this sounds like the best way to handle it. (cherry picked from commit 8f42478) # Conflicts: # muted-tests.yml # server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java
1 parent 6b0c351 commit e034ede

File tree

2 files changed

+135
-6
lines changed

2 files changed

+135
-6
lines changed

muted-tests.yml

Lines changed: 130 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,136 @@ tests:
439439
issue: https://github.com/elastic/elasticsearch/issues/133234
440440
- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest
441441
method: latest files cannot change base id
442-
issue: https://github.com/elastic/elasticsearch/issues/133231
443-
- class: org.elasticsearch.packaging.test.DockerTests
444-
method: test072RunEsAsDifferentUserAndGroup
445-
issue: https://github.com/elastic/elasticsearch/issues/131412
442+
issue: https://github.com/elastic/elasticsearch/issues/133132
443+
- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest
444+
method: definitions have primary ids which cannot change
445+
issue: https://github.com/elastic/elasticsearch/issues/133131
446+
- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT
447+
method: testGroupBySubset
448+
issue: https://github.com/elastic/elasticsearch/issues/133220
449+
- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT
450+
method: testGroupByNothing
451+
issue: https://github.com/elastic/elasticsearch/issues/133225
452+
- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest
453+
method: named and unreferenced definitions cannot have the same name
454+
issue: https://github.com/elastic/elasticsearch/issues/133255
455+
- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest
456+
method: unreferenced definitions can have primary ids that are patches
457+
issue: https://github.com/elastic/elasticsearch/issues/133256
458+
- class: org.elasticsearch.gradle.internal.transport.TransportVersionValidationFuncTest
459+
method: latest can refer to an unreferenced definition
460+
issue: https://github.com/elastic/elasticsearch/issues/133257
461+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
462+
method: test {p0=search.vectors/100_knn_nested_search/nested kNN search inner_hits & profiling}
463+
issue: https://github.com/elastic/elasticsearch/issues/133273
464+
- class: org.elasticsearch.xpack.security.authc.AuthenticationServiceTests
465+
method: testInvalidToken
466+
issue: https://github.com/elastic/elasticsearch/issues/133328
467+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
468+
method: test {p0=search/160_exists_query/Test exists query on unmapped byte field}
469+
issue: https://github.com/elastic/elasticsearch/issues/133331
470+
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
471+
method: test {csv-spec:change_point.Values null column}
472+
issue: https://github.com/elastic/elasticsearch/issues/133334
473+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
474+
method: test {p0=search/110_field_collapsing/field collapsing}
475+
issue: https://github.com/elastic/elasticsearch/issues/133361
476+
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
477+
method: test {csv-spec:spatial.ConvertFromStringParseError}
478+
issue: https://github.com/elastic/elasticsearch/issues/133364
479+
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
480+
method: testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips
481+
issue: https://github.com/elastic/elasticsearch/issues/127302
482+
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
483+
method: testCCSClusterDetailsWhereAllShardsSkippedInCanMatch
484+
issue: https://github.com/elastic/elasticsearch/issues/133370
485+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
486+
method: test {p0=search.vectors/42_knn_search_int4_flat/kNN search with filter}
487+
issue: https://github.com/elastic/elasticsearch/issues/133420
488+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
489+
method: test {p0=search/160_exists_query/Test exists query on date field in empty index}
490+
issue: https://github.com/elastic/elasticsearch/issues/133439
491+
- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT
492+
method: test {yaml=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15}
493+
issue: https://github.com/elastic/elasticsearch/issues/133442
494+
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
495+
method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version}
496+
issue: https://github.com/elastic/elasticsearch/issues/133449
497+
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithFiltersIT
498+
method: testFilterWithUnavailableRemote
499+
issue: https://github.com/elastic/elasticsearch/issues/133450
500+
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT
501+
method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version}
502+
issue: https://github.com/elastic/elasticsearch/issues/133461
503+
- class: org.elasticsearch.xpack.esql.action.TimeSeriesRateIT
504+
method: testRateWithTimeBucketAndClusterMultipleMetricsByMin
505+
issue: https://github.com/elastic/elasticsearch/issues/133478
506+
- class: org.elasticsearch.xpack.esql.action.LookupJoinTypesIT
507+
method: testLookupJoinOthers
508+
issue: https://github.com/elastic/elasticsearch/issues/133480
509+
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
510+
method: testStopQueryLocal
511+
issue: https://github.com/elastic/elasticsearch/issues/133481
512+
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT
513+
method: testEsqlSource
514+
issue: https://github.com/elastic/elasticsearch/issues/132601
515+
- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT
516+
method: testEsqlSource
517+
issue: https://github.com/elastic/elasticsearch/issues/132600
518+
- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT
519+
method: testEsqlSource
520+
issue: https://github.com/elastic/elasticsearch/issues/132602
521+
- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT
522+
method: testMatchAllQuery
523+
issue: https://github.com/elastic/elasticsearch/issues/133497
524+
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT
525+
method: testMatchAllQuery
526+
issue: https://github.com/elastic/elasticsearch/issues/133498
527+
- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT
528+
method: testMatchAllQuery
529+
issue: https://github.com/elastic/elasticsearch/issues/133499
530+
- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT
531+
method: testRandomQueries
532+
issue: https://github.com/elastic/elasticsearch/issues/133503
533+
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT
534+
method: testRandomQueries
535+
issue: https://github.com/elastic/elasticsearch/issues/133504
536+
- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT
537+
method: testRandomQueries
538+
issue: https://github.com/elastic/elasticsearch/issues/133505
539+
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
540+
method: test {csv-spec:spatial.ConvertFromStringParseError}
541+
issue: https://github.com/elastic/elasticsearch/issues/133507
542+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
543+
method: test {p0=search.vectors/90_sparse_vector/Indexing and searching multi-value sparse vectors in >=8.15}
544+
issue: https://github.com/elastic/elasticsearch/issues/133508
545+
- class: org.elasticsearch.xpack.logsdb.qa.BulkChallengeRestIT
546+
method: testTermsQuery
547+
issue: https://github.com/elastic/elasticsearch/issues/133516
548+
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusStandardReindexedIntoLogsDbChallengeRestIT
549+
method: testTermsQuery
550+
issue: https://github.com/elastic/elasticsearch/issues/133517
551+
- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT
552+
method: testTermsQuery
553+
issue: https://github.com/elastic/elasticsearch/issues/133518
554+
- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT
555+
method: testEsqlSource
556+
issue: https://github.com/elastic/elasticsearch/issues/133520
557+
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
558+
method: testTopNPushedToLucene
559+
issue: https://github.com/elastic/elasticsearch/issues/133556
560+
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
561+
method: testFilterNestedFields
562+
issue: https://github.com/elastic/elasticsearch/issues/133557
563+
- class: org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT
564+
method: testMatchAllQuery
565+
issue: https://github.com/elastic/elasticsearch/issues/133560
566+
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
567+
method: test {p0=search/10_source_filtering/no filtering}
568+
issue: https://github.com/elastic/elasticsearch/issues/133561
569+
- class: org.elasticsearch.compute.lucene.LuceneTopNSourceOperatorTests
570+
method: testShardDataPartitioning
571+
issue: https://github.com/elastic/elasticsearch/issues/133574
446572

447573
# Examples:
448574
#

server/src/test/java/org/elasticsearch/index/mapper/LongFieldMapperTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public void testLongIndexingCoercesIntoRange() throws Exception {
103103
assertThat(doc.rootDoc().getFields("field"), hasSize(1));
104104
}
105105

106+
// This is the biggest long that double can represent exactly
107+
public static final long MAX_SAFE_LONG_FOR_DOUBLE = 1L << 53;
108+
106109
@Override
107110
protected Number randomNumber() {
108111
if (randomBoolean()) {
@@ -111,8 +114,8 @@ protected Number randomNumber() {
111114
if (randomBoolean()) {
112115
return randomDouble();
113116
}
114-
assumeFalse("https://github.com/elastic/elasticsearch/issues/70585", true);
115-
return randomDoubleBetween(Long.MIN_VALUE, Long.MAX_VALUE, true);
117+
// TODO: increase the range back to full LONG range once https://github.com/elastic/elasticsearch/issues/132893 is fixed
118+
return randomDoubleBetween(-MAX_SAFE_LONG_FOR_DOUBLE, MAX_SAFE_LONG_FOR_DOUBLE, true);
116119
}
117120

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

0 commit comments

Comments
 (0)