From c70a6526d2299cd32023929ca93b053f2ffd8e4d Mon Sep 17 00:00:00 2001 From: zensh Date: Sat, 11 Apr 2020 15:13:00 +0800 Subject: [PATCH] fix LabelStore test --- pkg/middlewares/canary/label_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/middlewares/canary/label_test.go b/pkg/middlewares/canary/label_test.go index e44f4a43eb..3871d9cdb1 100644 --- a/pkg/middlewares/canary/label_test.go +++ b/pkg/middlewares/canary/label_test.go @@ -38,7 +38,7 @@ func TestLabelStore(t *testing.T) { t.Run("mustLoadEntry should work", func(t *testing.T) { a := assert.New(t) - cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost", Product: "T"} + cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost1", Product: "T"} ls := NewLabelStore(logrus.StandardLogger(), cfg, time.Second, time.Second*2) ls.mustFetchLabels = func(ctx context.Context, uid, requestID string) ([]Label, int64) { return []Label{{Label: requestID}}, time.Now().Unix() @@ -83,7 +83,7 @@ func TestLabelStore(t *testing.T) { t.Run("MustLoadLabels should work", func(t *testing.T) { a := assert.New(t) - cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost", Product: "T"} + cfg := dynamic.Canary{MaxCacheSize: 3, Server: "localhost2", Product: "T"} ls := NewLabelStore(logrus.StandardLogger(), cfg, time.Second, time.Second*2) ls.mustFetchLabels = func(ctx context.Context, uid, requestID string) ([]Label, int64) { return []Label{{Label: requestID}}, time.Now().Unix()