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 testClusterStateBatchedUpdates test #10922

Merged

Conversation

amkhar
Copy link
Contributor

@amkhar amkhar commented Oct 25, 2023

Description

Move the assertion to more deterministic test where cluster state update will happen for sure. Executed the test 1000 time locally in a loop to verify it's not going to be flaky anymore.

Related Issues

Resolves #10899

Check List

  • New functionality includes testing.
  • All tests pass
    - [x] New functionality has been documented.
    - [x] 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
    - [x] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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: Aman Khare <amkhar@amazon.com>
Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

LGTM.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #10922 (afc5919) into main (5a288ed) will decrease coverage by 0.08%.
Report is 9 commits behind head on main.
The diff coverage is 53.66%.

@@             Coverage Diff              @@
##               main   #10922      +/-   ##
============================================
- Coverage     71.22%   71.15%   -0.08%     
- Complexity    58678    58682       +4     
============================================
  Files          4869     4872       +3     
  Lines        276496   276682     +186     
  Branches      40203    40219      +16     
============================================
- Hits         196936   196860      -76     
- Misses        63114    63440     +326     
+ Partials      16446    16382      -64     
Files Coverage Δ
...search/repositories/s3/AmazonAsyncS3Reference.java 84.61% <100.00%> (+1.28%) ⬆️
.../repositories/s3/AmazonAsyncS3WithCredentials.java 100.00% <100.00%> (ø)
...org/opensearch/repositories/s3/S3AsyncService.java 72.28% <100.00%> (+1.09%) ⬆️
...va/org/opensearch/repositories/s3/S3BlobStore.java 68.75% <100.00%> (+0.49%) ⬆️
...a/org/opensearch/repositories/s3/S3Repository.java 70.08% <100.00%> (+0.25%) ⬆️
...search/cluster/coordination/CoordinationState.java 88.39% <ø> (ø)
.../org/opensearch/cluster/service/MasterService.java 83.72% <100.00%> (-1.34%) ⬇️
...h/common/blobstore/stream/write/WritePriority.java 100.00% <100.00%> (ø)
...nsearch/gateway/remote/RemotePersistenceStats.java 100.00% <100.00%> (ø)
...epositories/blobstore/ChecksumBlobStoreFormat.java 95.45% <100.00%> (+0.29%) ⬆️
... and 12 more

... and 458 files with indirect coverage changes

@github-actions
Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change afc5919

Incompatible components

Incompatible components: [https://github.com/opensearch-project/cross-cluster-replication.git, 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/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]

@amkhar
Copy link
Contributor Author

amkhar commented Oct 25, 2023

@shwetathareja @Bukhtawar

@ashking94
Copy link
Member

@amkhar can you strike out things from checklist that don't apply for the build checklist to be green.

Copy link
Collaborator

@Bukhtawar Bukhtawar left a comment

Choose a reason for hiding this comment

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

Code coverage checks are failing, might need to be addressed

@amkhar
Copy link
Contributor Author

amkhar commented Oct 25, 2023

Code coverage checks are failing, might need to be addressed

Thanks @Bukhtawar for approval. This PR is just for test change no code changes are part of this PR.

@mch2 mch2 merged commit 44a9f18 into opensearch-project:main Oct 25, 2023
49 of 104 checks passed
@mch2
Copy link
Member

mch2 commented Oct 25, 2023

Going ahead with this as its blocking a lot of checks and gc passes.

@mch2 mch2 added the backport 2.x Backport to 2.x branch label Oct 25, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 25, 2023
Signed-off-by: Aman Khare <amkhar@amazon.com>
Co-authored-by: Aman Khare <amkhar@amazon.com>
(cherry picked from commit 44a9f18)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mch2 pushed a commit that referenced this pull request Oct 25, 2023
(cherry picked from commit 44a9f18)

Signed-off-by: Aman Khare <amkhar@amazon.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>
Co-authored-by: Aman Khare <amkhar@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
Signed-off-by: Aman Khare <amkhar@amazon.com>
Co-authored-by: Aman Khare <amkhar@amazon.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 bug Something isn't working flaky-test Random test failure that succeeds on second run skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MasterServiceTests.testClusterStateBatchedUpdates is flaky - expected:<1> but was:<2>
4 participants