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

InternalCardinalityTests#testEqualsAndHashcode failure #62540

Open
iverase opened this issue Sep 17, 2020 · 4 comments · Fixed by #62542
Open

InternalCardinalityTests#testEqualsAndHashcode failure #62540

iverase opened this issue Sep 17, 2020 · 4 comments · Fixed by #62542
Assignees
Labels
:Analytics/Aggregations Aggregations low-risk An open issue or test failure that is a low risk to future releases Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI v7.10.0 v8.0.0-alpha1

Comments

@iverase
Copy link
Contributor

iverase commented Sep 17, 2020

The failure can easily be reproduce with:

 ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.metrics.InternalCardinalityTests.testEqualsAndHashcode" -Dtests.seed=7FFFBA60D5055C4B -Dtests.security.manager=true -Dtests.locale=ar-EG -Dtests.timezone=Europe/Saratov -Druntime.java=11

And the error looks like:

  2> java.lang.AssertionError: InternalCardinality mutation should not be equal to original
    Expected: not <{"fmTtJ":{"meta":{"RPdFM":"Bglpg","VLYUl":"qWMAU"},"value":50}}>
         but: was <{"fmTtJ":{"meta":{"RPdFM":"Bglpg","VLYUl":"qWMAU"},"value":50}}>
        at __randomizedtesting.SeedInfo.seed([7FFFBA60D5055C4B:EF0C2AD1AE21564]:0)

I had a look and the problem is as follows. Before #62480 for testing equality we were ignoring the provided bucket and were generating a string that was generated by all the elements in the runLens array. From now on we are only considering the runLens in the bucket (which I think is the right thing).

The test is mutating a HyperLogLog++ by adding new elements, unfortunately the values did not change so the resulting sketch is the same as the previous one. Before it did not fail because the original HyperLogLog++ contained more buckets.

@iverase iverase added :Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI v8.0.0 v7.10.0 labels Sep 17, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Sep 17, 2020
@iverase iverase changed the title InternalCardinalityTests#testEqualsAndHashcode InternalCardinalityTests#testEqualsAndHashcode failure Sep 17, 2020
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the needs:risk Requires assignment of a risk label (low, medium, blocker) label Apr 26, 2024
@iverase
Copy link
Contributor Author

iverase commented Apr 26, 2024

Let's open a new issue next time so we keep the message:

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.metrics.InternalCardinalityTests.testEqualsAndHashcode" -Dtests.seed=F7FC01BCB312DEE5 -Dtests.locale=mt -Dtests.timezone=Africa/Douala -Druntime.java=21

org.elasticsearch.search.aggregations.metrics.InternalCardinalityTests > testEqualsAndHashcode FAILED
    java.lang.AssertionError: InternalCardinality mutation should not be equal to original
    Expected: not <{"tZZpk":{"value":11}}>
         but: was <{"tZZpk":{"value":11}}>
        at __randomizedtesting.SeedInfo.seed([F7FC01BCB312DEE5:86F379717CF597CA]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:964)
        at org.elasticsearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode(EqualsHashCodeTestUtils.java:95)
        at org.elasticsearch.test.AbstractWireTestCase.testEqualsAndHashcode(AbstractWireTestCase.java:60)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)

@iverase iverase added low-risk An open issue or test failure that is a low risk to future releases and removed needs:risk Requires assignment of a risk label (low, medium, blocker) labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations low-risk An open issue or test failure that is a low risk to future releases Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants