We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a80505d commit 03d2e35Copy full SHA for 03d2e35
test/redis_client/circuit_breaker_test.rb
@@ -21,6 +21,18 @@ def test_open_circuit_after_consecutive_errors
21
assert_open @circuit_breaker
22
end
23
24
+ def test_track_errors_during_error_threshold_window
25
+ assert_closed @circuit_breaker
26
+ (@circuit_breaker.error_threshold - 1).times do
27
+ record_error @circuit_breaker
28
+ end
29
+
30
+ travel(@circuit_breaker.error_threshold_timeout - 0.01) do
31
32
+ assert_open @circuit_breaker
33
34
35
36
def test_allow_use_after_the_errors_timedout
37
open_circuit @circuit_breaker
38
0 commit comments