Skip to content

Commit

Permalink
test: fix flaky test TestSyncJobSchemaVerLoop (#53507)
Browse files Browse the repository at this point in the history
close #53508
  • Loading branch information
D3Hunter authored May 23, 2024
1 parent 22dc064 commit 322f87a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions pkg/ddl/syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ func (s *schemaVersionSyncer) OwnerCheckAllVersions(ctx context.Context, jobID i
case <-notifyCh:
return nil
case <-ctx.Done():
item.clearMatchFn()
return errors.Trace(ctx.Err())
case <-time.After(time.Second):
item.clearMatchFn()
Expand Down
2 changes: 0 additions & 2 deletions pkg/ddl/syncer/syncer_nokit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,4 @@ func TestSyncJobSchemaVerLoop(t *testing.T) {

cancel()
wg.Wait()

require.Zero(t, jobNodeVersionCnt())
}

0 comments on commit 322f87a

Please sign in to comment.