Skip to content

Commit

Permalink
Address the comments
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 444524d commit 54d4199
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/client/testutil"
"go.uber.org/goleak"
"google.golang.org/grpc"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m, testutil.LeakOptions...)
}

func TestTsLessEqual(t *testing.T) {
re := require.New(t)
re.True(tsLessEqual(9, 9, 9, 9))
Expand Down
7 changes: 6 additions & 1 deletion tests/client/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 TiKV Project Authortc.
// Copyright 2018 TiKV Project Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,13 +43,18 @@ import (
"github.com/tikv/pd/server/storage/endpoint"
"github.com/tikv/pd/server/tso"
"github.com/tikv/pd/tests"
"go.uber.org/goleak"
)

const (
tsoRequestConcurrencyNumber = 5
tsoRequestRound = 30
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m, testutil.LeakOptions...)
}

type client interface {
GetLeaderAddr() string
ScheduleCheckLeader()
Expand Down

0 comments on commit 54d4199

Please sign in to comment.