opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.44k stars 1.73k forks source link

[BUG] org.opensearch.search.profile.query.QueryProfilerTests.testBasic {p0=5} is flaky #10941

Open ashking94 opened 10 months ago

ashking94 commented 10 months ago

Describe the bug org.opensearch.search.profile.query.QueryProfilerTests.testBasic {p0=5} test is flaky.

Below assertion failure can be seen -

java.lang.AssertionError: 
Expected: a value greater than <0L>
     but: <0L> was equal to <0L>

To Reproduce https://build.ci.opensearch.org/job/gradle-check/29044/testReport/junit/org.opensearch.search.profile.query/QueryProfilerTests/testBasic__p0_5_/

Expected behavior Test must always pass.

nknize commented 10 months ago

Similar reproducible error:

./gradlew ':server:test' --tests "org.opensearch.search.profile.query.QueryProfilerTests.testApproximations {p0=5}" -Dtests.seed=D11999824BA0CE71 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=zh-CN -Dtests.timezone=Africa/Bamako
  2> java.lang.AssertionError: 
    Expected: a value greater than <0L>
         but: <0L> was equal to <0L>
        at __randomizedtesting.SeedInfo.seed([D11999824BA0CE71:14FADAE707F9B355]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:964)
        at org.junit.Assert.assertThat(Assert.java:930)
        at org.opensearch.search.profile.query.QueryProfilerTests.testApproximations(QueryProfilerTests.java:349)

This, by definition, is a bug not a flaky test. A flaky test isn't reproducible. This reproduces on all supported jdks.

nknize commented 10 months ago

I removed the flaky test label and added a severity. If I have some cycles I'll look at this but it would be better for someone else to take it.

dblock commented 4 months ago

Happened again in https://github.com/opensearch-project/OpenSearch/pull/13358, reopening.