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

Fixing flaky test for knn codecs #612

Conversation

martin-gaievski
Copy link
Member

Signed-off-by: Martin Gaievski [email protected]

Description

Trying new PR as a duplicate of #610, seems in that one github is pulling incorrect commit and rolling upgrade bwc are failing. I tested bwc in dev environment they work fine. Creating this as a draft for now to see if checks are ok

Fixed flaky unit tests, narrow assertion logic and adjust for test runs with multi node mock cluster

Repro for certain seeds:

./gradlew ':test' --tests "org.opensearch.knn.index.codec.KNN940Codec.KNN940CodecTests.testKnnVectorIndex" -Dtests.seed=B5E0DC7BF07CBCC1 -Dtests.security.manager=false -Dtests.locale=el-CY -Dtests.timezone=America/Mendoza -Druntime.java=17

org.opensearch.knn.index.codec.KNN940Codec.KNN940CodecTests > testKnnVectorIndex FAILED
    org.mockito.exceptions.verification.TooManyActualInvocations:
    kNN940PerFieldKnnVectorsFormat.getKnnVectorsFormatForField(
        <any string>
    );

After change test runs are succesful:

./gradlew ':test' -Dtests.seed=B5E0DC7BF07CBCC1

BUILD SUCCESSFUL in 1m 35s
15 actionable tasks: 6 executed, 9 up-to-date

Issues Resolved

[List any issues this PR will resolve]

Check List

  • All tests pass
  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Martin Gaievski <[email protected]>
@martin-gaievski martin-gaievski added backport 2.x v2.4.0 'Issues and PRs related to version v2.4.0' backport 2.4 backport to 2.4 branch labels Nov 3, 2022
@martin-gaievski martin-gaievski changed the base branch from main to 2.x November 3, 2022 16:11
@martin-gaievski martin-gaievski changed the base branch from 2.x to main November 3, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.4 backport to 2.4 branch v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant