From 2722a88e7b2e56a62ea90042c2bc9ba6c8a99afe Mon Sep 17 00:00:00 2001 From: JmPotato Date: Wed, 1 Jun 2022 12:55:18 +0800 Subject: [PATCH] Fix the typo and refine some tests Signed-off-by: JmPotato --- tests/client/client_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/client/client_test.go b/tests/client/client_test.go index 7cc1c00c55f7..822f0f33d451 100644 --- a/tests/client/client_test.go +++ b/tests/client/client_test.go @@ -592,7 +592,7 @@ func (i *idAllocator) alloc() uint64 { var ( regionIDAllocator = &idAllocator{allocator: &mockid.IDAllocator{}} // Note: IDs below are entirely arbitrary. They are only for checking - // whether GetRegion/GetStore worktc. + // whether GetRegion/GetStore works. // If we alloc ID in client in the future, these IDs must be updated. stores = []*metapb.Store{ {Id: 1, @@ -911,7 +911,7 @@ func TestScanRegions(t *testing.T) { re.NoError(err) } - // Wait for region heartbeattc. + // Wait for region heartbeats. testutil.WaitUntilWithTestingT(t, func() bool { scanRegions, err := tc.client.ScanRegions(context.Background(), []byte{0}, nil, 10) return err == nil && len(scanRegions) == 10 @@ -1202,7 +1202,7 @@ func TestUpdateServiceGCSafePoint(t *testing.T) { "", 1000, 15) re.Error(err) - // Put some other safepoints to test fixing gc_worker's safepoint when there exists other safepointtc. + // Put some other safepoints to test fixing gc_worker's safepoint when there exists other safepoints. _, err = tc.client.UpdateServiceGCSafePoint(context.Background(), "a", 1000, 11) re.NoError(err) @@ -1356,8 +1356,9 @@ func TestConfigTTLAfterTransferLeader(t *testing.T) { resp.Body.Close() re.NoError(err) time.Sleep(2 * time.Second) - _ = leader.Destroy() + re.NoError(leader.Destroy()) time.Sleep(2 * time.Second) leader = cluster.GetServer(cluster.WaitLeader()) + re.NotNil(leader) assertTTLConfig(re, leader.GetPersistOptions()) }