From c1737d732956af1bf9ccca8e41ceb4deddd8e0e3 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Mar 2016 18:45:59 +0000 Subject: [PATCH] Fix test --- hystrix_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hystrix_test.go b/hystrix_test.go index d4a3549..3e484ea 100644 --- a/hystrix_test.go +++ b/hystrix_test.go @@ -3,6 +3,7 @@ package hystrix import ( "testing" + "github.com/afex/hystrix-go/hystrix" "github.com/micro/go-micro/client" "github.com/micro/go-micro/registry/mock" "github.com/micro/go-micro/selector" @@ -29,7 +30,7 @@ func TestBreaker(t *testing.T) { var rsp map[string]interface{} // Force to point of trip - for i := 0; i < 25; i++ { + for i := 0; i < (hystrix.DefaultVolumeThreshold * 2); i++ { c.Call(context.TODO(), req, rsp) } @@ -39,6 +40,6 @@ func TestBreaker(t *testing.T) { } if err.Error() != "hystrix: circuit open" { - t.Error("Expecting tripped breaker, got %v", err) + t.Errorf("Expecting tripped breaker, got %v", err) } }