Skip to content

Commit

Permalink
Fix the test
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Jun 21, 2022
1 parent 98bfdb5 commit d4d93e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/server/join/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/etcdutil"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/join"
"github.com/tikv/pd/tests"
)
Expand Down Expand Up @@ -56,7 +57,7 @@ func TestSimpleJoin(t *testing.T) {
err = pd2.Run()
re.NoError(err)
_, err = os.Stat(path.Join(pd2.GetConfig().DataDir, "join"))
re.True(os.IsNotExist(err))
re.False(os.IsNotExist(err))
members, err = etcdutil.ListEtcdMembers(client)
re.NoError(err)
re.Len(members.Members, 2)
Expand Down Expand Up @@ -84,6 +85,7 @@ func TestFailedAndDeletedPDJoinsPreviousCluster(t *testing.T) {
re := require.New(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
server.EtcdStartTimeout = 10 * time.Second
cluster, err := tests.NewTestCluster(ctx, 3)
defer cluster.Destroy()
re.NoError(err)
Expand Down Expand Up @@ -116,6 +118,7 @@ func TestDeletedPDJoinsPreviousCluster(t *testing.T) {
re := require.New(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
server.EtcdStartTimeout = 10 * time.Second
cluster, err := tests.NewTestCluster(ctx, 3)
defer cluster.Destroy()
re.NoError(err)
Expand Down

0 comments on commit d4d93e4

Please sign in to comment.