Skip to content

Commit

Permalink
*: fix panic in the TestStateSyncerSimple (#43944)
Browse files Browse the repository at this point in the history
close #43943
  • Loading branch information
hawkingrei authored May 18, 2023
1 parent 7e3b947 commit 6950c2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddl/syncer/state_syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ func TestStateSyncerSimple(t *testing.T) {
WithLease(testLease),
WithInfoCache(ic),
)
go func() {
var wg util.WaitGroupWrapper
wg.Run(func() {
require.NoError(t, d.OwnerManager().CampaignOwner())
}()
})
defer d.OwnerManager().Cancel()
// TODO: We can remove it when we call it in newDDL.
require.NoError(t, d.StateSyncer().Init(ctx))
Expand All @@ -77,7 +78,6 @@ func TestStateSyncerSimple(t *testing.T) {
require.Equal(t, stateInfo, respState)
require.False(t, d.StateSyncer().IsUpgradingState())
// for watchCh
var wg util.WaitGroupWrapper
var checkErr string
stateInfo.State = syncer.StateUpgrading
stateInfoByte, err := stateInfo.Marshal()
Expand Down

0 comments on commit 6950c2b

Please sign in to comment.