Skip to content

Commit

Permalink
Fix the typo and refine some tests
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Jun 1, 2022
1 parent 0892c39 commit 2722a88
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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())
}

0 comments on commit 2722a88

Please sign in to comment.