From cce5a2fd7082eabba75c90488031c593f4827df4 Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Thu, 19 Dec 2024 20:34:31 +0800 Subject: [PATCH] test Signed-off-by: lhy1024 --- tests/tso_cluster.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tso_cluster.go b/tests/tso_cluster.go index d49143cab94..e1ecf051c87 100644 --- a/tests/tso_cluster.go +++ b/tests/tso_cluster.go @@ -179,6 +179,9 @@ func (tc *TestTSOCluster) WaitForPrimaryServing(re *require.Assertions, keyspace return false }, testutil.WithWaitFor(30*time.Second), testutil.WithTickInterval(100*time.Millisecond)) testutil.Eventually(re, func() bool { + if tc.pd.GetLeaderServer() == nil { + return false + } return tc.pd.GetLeaderServer().GetRaftCluster().IsServiceIndependent(constant.TSOServiceName) }) return primary