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 testUploadMetadataMissingSegment unit test on 2.x #9099

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Aug 3, 2023

Description

Fixes unit test testUploadMetadataMissingSegment by fetching primary term from ReplicationCheckpoint vs using hard-coded value.

Related Issues

Resolves #9096

Test

Ran this test 1k times successfully without failure

Screenshot 2023-08-03 at 12 35 35 PM

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • 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: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 changed the title Fix unit test Fix unit test on 2.x Aug 3, 2023
@dreamer-89 dreamer-89 changed the title Fix unit test on 2.x Fix testUploadMetadataMissingSegment unit test on 2.x Aug 3, 2023
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:

> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/opensearch-oci-object-storage.git with ref: 2.x
Skipping compatibility check for https://github.com/opensearch-project/opensearch-oci-object-storage.git
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git]
Components skipped due to git failures: [https://github.com/opensearch-project/opensearch-oci-object-storage.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git]

BUILD SUCCESSFUL in 23m 19s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testRelocateWhileContinuouslyIndexingAndWaitingForRefresh

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #9099 (17cc4b4) into 2.x (6ab46bd) will increase coverage by 0.12%.
Report is 3 commits behind head on 2.x.
The diff coverage is 95.65%.

@@             Coverage Diff              @@
##                2.x    #9099      +/-   ##
============================================
+ Coverage     70.72%   70.84%   +0.12%     
- Complexity    57372    57473     +101     
============================================
  Files          4754     4754              
  Lines        271625   271650      +25     
  Branches      40066    40067       +1     
============================================
+ Hits         192102   192460     +358     
+ Misses        62972    62705     -267     
+ Partials      16551    16485      -66     
Files Changed Coverage Δ
...ch/indices/recovery/PeerRecoveryTargetService.java 51.96% <0.00%> (-1.97%) ⬇️
...nsearch/search/internal/FilteredSearchContext.java 8.84% <0.00%> (-0.08%) ⬇️
...va/org/opensearch/search/DefaultSearchContext.java 78.84% <90.00%> (+0.55%) ⬆️
...ices/replication/RemoteStoreReplicationSource.java 90.74% <96.42%> (-3.55%) ⬇️
...in/java/org/opensearch/index/shard/IndexShard.java 69.01% <100.00%> (-0.70%) ⬇️
...search/index/shard/RemoteStoreRefreshListener.java 84.06% <100.00%> (-0.64%) ⬇️
...java/org/opensearch/index/shard/StoreRecovery.java 56.72% <100.00%> (-0.53%) ⬇️
...earch/index/store/RemoteSegmentStoreDirectory.java 87.70% <100.00%> (ø)
...rc/main/java/org/opensearch/index/store/Store.java 80.10% <100.00%> (-0.14%) ⬇️
...x/store/remote/metadata/RemoteSegmentMetadata.java 100.00% <100.00%> (ø)
... and 2 more

... and 466 files with indirect coverage changes

@dreamer-89 dreamer-89 merged commit ae9373a into opensearch-project:2.x Aug 3, 2023
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants