Fix reactive sentinel circuit breaker tests (#3054)

* Fix reactive sentinel circuit breaker tests
pull/3159/head
ruansheng 2 years ago committed by GitHub
parent 0cdd2d784d
commit 7a491030e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -74,8 +74,9 @@ public class ReactiveSentinelCircuitBreakerIntegrationTest {
// 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();
@ -91,8 +92,9 @@ public class ReactiveSentinelCircuitBreakerIntegrationTest {
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();

Loading…
Cancel
Save