Skip to content

Commit

Permalink
ddl: make the test stable (#6223)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored Apr 4, 2018
1 parent 6395b58 commit 0c58e9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ddl/ddl_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (

const (
// waitForCleanDataRound indicates how many times should we check data is cleaned or not.
waitForCleanDataRound = 60
waitForCleanDataRound = 150
// waitForCleanDataInterval is a min duration between 2 check for data clean.
waitForCleanDataInterval = time.Millisecond * 100
)
Expand Down Expand Up @@ -736,6 +736,7 @@ LOOP:
}

func checkDelRangeDone(c *C, ctx sessionctx.Context, idx table.Index) {
startTime := time.Now()
f := func() map[int64]struct{} {
handles := make(map[int64]struct{})

Expand Down Expand Up @@ -767,7 +768,7 @@ func checkDelRangeDone(c *C, ctx sessionctx.Context, idx table.Index) {
break
}
}
c.Assert(handles, HasLen, 0)
c.Assert(handles, HasLen, 0, Commentf("take time %v", time.Since(startTime)))
}

func (s *testDBSuite) TestAddIndexWithDupCols(c *C) {
Expand Down

0 comments on commit 0c58e9f

Please sign in to comment.