Skip to content

Commit

Permalink
Add extra test for net error strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
etimberg committed Feb 17, 2020
1 parent 7fb10d0 commit 28d5d96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/strategies/test_net_error_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ def test_net_error_strategy_half_open_to_open(error_func, success_func):
breaker.call(error_func)

assert breaker.state == CircuitBreakerState.OPEN


def test_net_error_strategy_count_never_negative(success_func):
breaker = CircuitBreaker(strategy=CircuitBreakerStrategy.NET_ERROR,)
breaker.call(success_func)

assert breaker._strategy._net_error_count == 0

0 comments on commit 28d5d96

Please sign in to comment.