Skip to content

Commit

Permalink
test(dm): fix datarace for testSyncerSuite.TestRun (pingcap#4305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 authored and zhaoxinyu committed Jan 20, 2022
1 parent a4c4402 commit 3e00852
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dm/syncer/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ func (s *testSyncerSuite) TestRun(c *C) {
}

cancel()
<-resultCh // wait for the process to finish
// when syncer exit Run(), will flush job
syncer.Pause()

Expand Down Expand Up @@ -1023,6 +1024,7 @@ func (s *testSyncerSuite) TestRun(c *C) {
testJobs.RUnlock()

cancel()
<-resultCh // wait for the process to finish
syncer.Close()
c.Assert(syncer.isClosed(), IsTrue)

Expand Down

0 comments on commit 3e00852

Please sign in to comment.