Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.testReduceRandom fails #54540

Closed
hub-cap opened this issue Mar 31, 2020 · 3 comments · Fixed by #54602
Assignees
Labels
:Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI

Comments

@hub-cap
Copy link
Contributor

hub-cap commented Mar 31, 2020

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.testReduceRandom" -Dtests.seed=5D0B922735110573 -Dtests.security.manager=true -Dtests.locale=vi -Dtests.timezone=ACT -Dcompiler.java=13
Suite: Test class org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests
  1> [2020-04-01T07:09:37,652][INFO ][o.e.s.a.b.h.InternalAutoDateHistogramTests] [testReduceRandom] before test
  1> [2020-04-01T07:09:37,773][INFO ][o.e.s.a.b.h.InternalAutoDateHistogramTests] [testReduceRandom] after test
  2> REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.testReduceRandom" -Dtests.seed=5D0B922735110573 -Dtests.security.manager=true -Dtests.locale=vi -Dtests.timezone=ACT -Dcompiler.java=13
  2> java.lang.AssertionError: expected:<{1583020800000=2193, 1585612800000=1561}> but was:<{1583020800000=2193, 1585699200000=1561}>
        at __randomizedtesting.SeedInfo.seed([5D0B922735110573:9D363E36134C9C25]:0)
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:834)
        at org.junit.Assert.assertEquals(Assert.java:118)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.assertReduced(InternalAutoDateHistogramTests.java:203)
        at org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.assertReduced(InternalAutoDateHistogramTests.java:49)
        at org.elasticsearch.test.InternalAggregationTestCase.testReduceRandom(InternalAggregationTestCase.java:326)
        at org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.testReduceRandom(InternalAutoDateHistogramTests.java:112)
  2> NOTE: leaving temporary files on disk at: /home/baz/src/elastic/elasticsearch/server/build/testrun/test/temp/org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests_5D0B922735110573-001
  2> NOTE: test params are: codec=Asserting(Lucene84), sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@91aab33), locale=vi, timezone=ACT
  2> NOTE: Linux 5.0.0-32-generic amd64/AdoptOpenJDK 14 (64-bit)/cpus=12,threads=1,free=487884488,total=536870912
  2> NOTE: All tests run in this JVM: [InternalAutoDateHistogramTests]

@hub-cap hub-cap added the >test-failure Triaged test failures from CI label Mar 31, 2020
@hub-cap hub-cap added the :Analytics/Aggregations Aggregations label Mar 31, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@ywangd
Copy link
Member

ywangd commented Mar 31, 2020

Two more failures just now (7.6):

Can be reproduced locally with

./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests.testReduceRandom" \
  -Dtests.seed=7B89245A80E80B72 \
  -Dtests.security.manager=true \
  -Dtests.locale=es-US \
  -Dtests.timezone=Australia/Broken_Hill \
  -Dcompiler.java=13

Sample failure message:

:server:test » org.elasticsearch.search.aggregations.bucket.histogram.InternalAutoDateHistogramTests » testReduceRandom (0.082s)
expected:<{1583020800000=2179, 1585612800000=45}> but was:<{1583020800000=2179, 1585699200000=45}>
java.lang.AssertionError: expected:<{1583020800000=2179, 1585612800000=45}> but was:<{1583020800000=2179, 1585699200000=45}>

@nik9000
Copy link
Member

nik9000 commented Mar 31, 2020 via email

nik9000 added a commit to nik9000/elasticsearch that referenced this issue Apr 1, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes elastic#54540
Closes elastic#39497
nik9000 added a commit that referenced this issue Apr 2, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes #54540
Closes #39497
nik9000 added a commit to nik9000/elasticsearch that referenced this issue Apr 2, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes elastic#54540
Closes elastic#39497
nik9000 added a commit to nik9000/elasticsearch that referenced this issue Apr 2, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes elastic#54540
Closes elastic#39497
nik9000 added a commit that referenced this issue Apr 3, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes #54540
Closes #39497
nik9000 added a commit that referenced this issue Apr 3, 2020
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes #54540
Closes #39497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants