From c514937500f0194315720e03a60f89ffd500d604 Mon Sep 17 00:00:00 2001 From: Hu# Date: Fri, 19 Jul 2024 15:06:01 +0800 Subject: [PATCH] resourcemanager: make TestResourceManagerServer more stable (#8418) close tikv/pd#8417 Signed-off-by: husharp Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- tests/integrations/mcs/resourcemanager/server_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integrations/mcs/resourcemanager/server_test.go b/tests/integrations/mcs/resourcemanager/server_test.go index eaeef99e9d6..5ab8745f7be 100644 --- a/tests/integrations/mcs/resourcemanager/server_test.go +++ b/tests/integrations/mcs/resourcemanager/server_test.go @@ -25,6 +25,7 @@ import ( rmpb "github.com/pingcap/kvproto/pkg/resource_manager" "github.com/stretchr/testify/require" "github.com/tikv/pd/client/grpcutil" + bs "github.com/tikv/pd/pkg/basicserver" "github.com/tikv/pd/pkg/utils/tempurl" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/tests" @@ -49,6 +50,7 @@ func TestResourceManagerServer(t *testing.T) { s, cleanup := tests.StartSingleResourceManagerTestServer(ctx, re, leader.GetAddr(), tempurl.Alloc()) addr := s.GetAddr() defer cleanup() + tests.WaitForPrimaryServing(re, map[string]bs.Server{addr: s}) // Test registered GRPC Service cc, err := grpcutil.GetClientConn(ctx, addr, nil)