diff --git a/circuitbreaker/util_test.go b/circuitbreaker/util_test.go index 34e0e81..4dca472 100644 --- a/circuitbreaker/util_test.go +++ b/circuitbreaker/util_test.go @@ -6,6 +6,7 @@ "path/filepath" "runtime" "testing" + "time" "golang.org/x/net/context" @@ -41,6 +42,9 @@ } thru := m.thru + // https://github.com/afex/hystrix-go/issues/41 + time.Sleep(time.Millisecond) + // But the rest should be blocked by an open circuit. for i := 0; i < 10; i++ { if _, err := e(context.Background(), struct{}{}); err.Error() != openCircuitError {