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 8bf7c49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestClientLeaderChange(t *testing.T) {
re := require.New(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cluster, err := tests.NewTestCluster(ctx, 3)
cluster, err := tests.NewTestCluster(ctx, 2)
re.NoError(err)
defer cluster.Destroy()

Expand Down 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 @@ -1342,7 +1342,7 @@ func TestConfigTTLAfterTransferLeader(t *testing.T) {
re := require.New(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cluster, err := tests.NewTestCluster(ctx, 3)
cluster, err := tests.NewTestCluster(ctx, 2)
re.NoError(err)
defer cluster.Destroy()
err = cluster.RunInitialServers()
Expand Down

0 comments on commit 8bf7c49

Please sign in to comment.