Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Feb 14, 2022
1 parent 0f49d3e commit 25a1680
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dm/dm/master/openapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func (t *openAPISuite) SetUpTest(c *check.C) {

func (t *openAPISuite) TestRedirectRequestToLeader(c *check.C) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

// create a new cluster
cfg1 := NewConfig()
Expand All @@ -92,6 +93,7 @@ func (t *openAPISuite) TestRedirectRequestToLeader(c *check.C) {
s1 := NewServer(cfg1)
c.Assert(s1.Start(ctx), check.IsNil)
defer s1.Close()
defer cancel()

// wait the first one become the leader
c.Assert(utils.WaitSomething(30, 100*time.Millisecond, func() bool {
Expand Down

0 comments on commit 25a1680

Please sign in to comment.