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

Fix flaky tests 'testDeleteAllAndListAllPits' and 'testDeleteWhileSearch' #10946

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

bharath-techie
Copy link
Contributor

@bharath-techie bharath-techie commented Oct 26, 2023

Description

testDeleteAllAndListAllPits :
List all PITs and delete all PITs both were triggered asynchronously and test was flaky in times where delete all finishes before get all. So fixed the test to order these two calls ( get will always finish first and then delete will be triggered )

testDeleteWhileSearch:
Added check for an error message which is also one of the valid scenarios

Tested using :

./gradlew ':client:rest-high-level:asyncIntegTest' --tests "org.opensearch.client.PitIT.testDeleteAllAndListAllPits" -Dtests.iters=1000

 ./gradlew ':server:internalClusterTest' --tests "org.opensearch.search.pit.DeletePitMultiNodeIT.testDeleteWhileSearch" -Dtests.iters=1000

Related Issues

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented. [Not applicable]
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog) [Not applicable]
  • Public documentation issue/PR created [Not applicable]

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.

@bharath-techie bharath-techie changed the title Fix flaky test 'testDeleteAllAndListAllPits' Fix flaky test 'testDeleteAllAndListAllPits' and 'testDeleteWhileSearch' Oct 26, 2023
@bharath-techie bharath-techie changed the title Fix flaky test 'testDeleteAllAndListAllPits' and 'testDeleteWhileSearch' Fix flaky tests 'testDeleteAllAndListAllPits' and 'testDeleteWhileSearch' Oct 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

Compatibility status:

Checks if related components are compatible with change 611e482

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.index.shard.RemoteIndexShardTests.testSegRepSucceedsOnPreviousCopiedFiles

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #10946 (611e482) into main (be65f54) will increase coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main   #10946      +/-   ##
============================================
+ Coverage     71.21%   71.26%   +0.04%     
- Complexity    58689    58714      +25     
============================================
  Files          4870     4870              
  Lines        276539   276539              
  Branches      40190    40190              
============================================
+ Hits         196945   197078     +133     
+ Misses        63192    62987     -205     
- Partials      16402    16474      +72     

see 471 files with indirect coverage changes

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.index.reindex.DeleteByQueryBasicTests.testDeleteByQueryWithMultipleIndices

@peternied
Copy link
Member

Failing checks are inspected and point to the corresponding known issue

@bharath-techie It looks like there were many failing checks - can you please inspect and create/update issues before this is merged?

@bharath-techie
Copy link
Contributor Author

Gradle check failures known issues seen in this PR checks :
#9499
#10755
#10945
#10902
#10154

Created issues :
#10972 - RemoteStoreIT flaky test

@bharath-techie
Copy link
Contributor Author

Can someone help merging this PR ?

@bharath-techie
Copy link
Contributor Author

@kotwanikunal @peternied can you help review / merge the code if the fix looks good ?

@peternied
Copy link
Member

Gradle check failures known issues seen in this PR checks :
...

@bharath-techie Thank you very much!

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this flaky test @bharath-techie

@peternied peternied merged commit 8673fa9 into opensearch-project:main Nov 1, 2023
17 checks passed
@bharath-techie bharath-techie added the backport 2.x Backport to 2.x branch label Nov 1, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 1, 2023
…#10946)

Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
(cherry picked from commit 8673fa9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peternied pushed a commit that referenced this pull request Nov 1, 2023
…#10946) (#11049)

(cherry picked from commit 8673fa9)

Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…opensearch-project#10946)

Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants