From 45ff568470a5c0f93c49cc420c164f80cc21a2ac Mon Sep 17 00:00:00 2001 From: wayblink Date: Tue, 31 Jan 2023 17:39:49 +0800 Subject: [PATCH] Fix probable ut fail caused by session key confict (#21883) Signed-off-by: wayblink --- internal/distributed/connection_manager_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/distributed/connection_manager_test.go b/internal/distributed/connection_manager_test.go index a2a2a806fd..572e5a9198 100644 --- a/internal/distributed/connection_manager_test.go +++ b/internal/distributed/connection_manager_test.go @@ -18,6 +18,7 @@ package distributed import ( "context" + "fmt" "net" "os" "os/signal" @@ -62,6 +63,9 @@ func TestMain(t *testing.M) { func TestConnectionManager(t *testing.T) { ctx := context.Background() + testPath := fmt.Sprintf("TestConnectionManager-%d", time.Now().Unix()) + paramtable.Get().Save(paramtable.Get().EtcdCfg.RootPath.Key, testPath) + session := initSession(ctx) cm := NewConnectionManager(session) cm.AddDependency(typeutil.RootCoordRole)