-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[BUG] #15013 Fix retryInterval in RetryPolicy will never be used in RetryUtils #15014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you please add UT for this.
You can use Assertions.assertTimeout to assert this, or assert the end time - start time > interval * retry times
long startTime = System.currentTimeMillis();
Assertions.assertThrows(RuntimeException.class, () -> RetryUtils.retryFunction((Supplier<Boolean>) () -> {
throw new RuntimeException("Test failed function");
}, new RetryUtils.RetryPolicy(3, 1000L)));
long endTime = System.currentTimeMillis();
Assertions.assertTrue(endTime - startTime >= 3000L && endTime - startTime < 4000L);
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #15014 +/- ##
=========================================
Coverage 38.02% 38.02%
Complexity 4693 4693
=========================================
Files 1304 1304
Lines 44812 44812
Branches 4804 4804
=========================================
Hits 17040 17040
Misses 25921 25921
Partials 1851 1851 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run mvn spotless:apply
to fix CI. @zhihuasu1
assigned
Kudos, SonarCloud Quality Gate passed! |
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
fix #15013
close #14928