Skip to content

Commit

Permalink
Fix reactive sentinel circuit breaker tests (#3054) (#3063)
Browse files Browse the repository at this point in the history
* Fix reactive sentinel circuit breaker tests
  • Loading branch information
ruansheng8 authored Jan 6, 2023
1 parent 390e082 commit 450efab
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ public void test() throws Exception {
// Then in the next 5s, the fallback method should be called.
for (int i = 0; i < 5; i++) {
StepVerifier.create(service.slow()).expectNext("fallback").verifyComplete();
Thread.sleep(1000);
Thread.sleep(900);
}
Thread.sleep(500);

// Half-open recovery (will re-open the circuit breaker).
StepVerifier.create(service.slow()).expectNext("slow").verifyComplete();
Expand All @@ -91,8 +92,9 @@ public void test() throws Exception {
for (int i = 0; i < 5; i++) {
StepVerifier.create(service.slowFlux()).expectNext("flux_fallback")
.verifyComplete();
Thread.sleep(1000);
Thread.sleep(900);
}
Thread.sleep(500);

// Half-open recovery (will re-open the circuit breaker).
StepVerifier.create(service.slowFlux()).expectNext("slowflux").verifyComplete();
Expand Down

0 comments on commit 450efab

Please sign in to comment.