Mock correct method in SegmentReplicationTargetServiceTests#20746
Mock correct method in SegmentReplicationTargetServiceTests#20746andrross merged 1 commit intoopensearch-project:mainfrom
Conversation
The test was mocking the wrong overload of startReplication(), which caused the real method to be invoke and would result in a failure + retry. The test assertion would then be racing with the retry and fail if the retry invoked startReplication() a second time. Signed-off-by: Andrew Ross <andrross@amazon.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
❌ Gradle check result for 54e38ce: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 54e38ce: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 54e38ce: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20746 +/- ##
============================================
- Coverage 73.29% 73.24% -0.05%
+ Complexity 72088 72049 -39
============================================
Files 5794 5794
Lines 329733 329733
Branches 47577 47577
============================================
- Hits 241664 241504 -160
- Misses 68612 68825 +213
+ Partials 19457 19404 -53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The test was mocking the wrong overload of startReplication(), which caused the real method to be invoke and would result in a failure + retry. The test assertion would then be racing with the retry and fail if the retry invoked startReplication() a second time.
Resolves #15829
Check List
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.