From a287bcf49dd2b53105cf3e894eafc38218165039 Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Thu, 21 Oct 2021 15:30:36 +0800 Subject: [PATCH] Fix proxy unittest (#10289) Signed-off-by: zhenshan.cao --- internal/proxy/proxy_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/proxy/proxy_test.go b/internal/proxy/proxy_test.go index 0a6ef2ea58..7804da805e 100644 --- a/internal/proxy/proxy_test.go +++ b/internal/proxy/proxy_test.go @@ -304,7 +304,7 @@ func runIndexNode(ctx context.Context, localMsg bool, alias string) *grpcindexno func TestProxy(t *testing.T) { var err error - path := "/tmp/milvus/rocksmq" + path := "/tmp/milvus/rocksmq" + funcutil.GenRandomStr() err = os.Setenv("ROCKSMQ_PATH", path) defer os.RemoveAll(path) assert.NoError(t, err) @@ -1166,7 +1166,7 @@ func TestProxy(t *testing.T) { // waiting for collection to be loaded counter := 0 for !f() { - if counter > 10 { + if counter > 100 { loaded = false break } @@ -1175,9 +1175,7 @@ func TestProxy(t *testing.T) { counter++ } }) - if !loaded { - log.Warn("load operation was not sure to be done") - } + assert.True(t, loaded) wg.Add(1) t.Run("show in-memory collections", func(t *testing.T) {