Skip to content

Commit

Permalink
ddl: fix flaky test TestGlobalVariablesOnFlashback (#40291)
Browse files Browse the repository at this point in the history
close #40287
  • Loading branch information
Defined2014 authored Jan 4, 2023
1 parent 3e6499b commit e95881f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ddl/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func TestFlashbackCloseAndResetPDSchedule(t *testing.T) {
}
dom.DDL().SetHook(hook)

time.Sleep(10 * time.Millisecond)
ts, err := tk.Session().GetStore().GetOracle().GetTimestamp(context.Background(), &oracle.Option{})
require.NoError(t, err)

Expand All @@ -144,6 +145,7 @@ func TestAddDDLDuringFlashback(t *testing.T) {
tk.MustExec("use test")
tk.MustExec("create table t(a int)")

time.Sleep(10 * time.Millisecond)
ts, err := tk.Session().GetStore().GetOracle().GetTimestamp(context.Background(), &oracle.Option{})
require.NoError(t, err)

Expand Down Expand Up @@ -182,6 +184,7 @@ func TestGlobalVariablesOnFlashback(t *testing.T) {
tk.MustExec("use test")
tk.MustExec("create table t(a int)")

time.Sleep(10 * time.Millisecond)
ts, err := tk.Session().GetStore().GetOracle().GetTimestamp(context.Background(), &oracle.Option{})
require.NoError(t, err)

Expand Down Expand Up @@ -260,6 +263,8 @@ func TestCancelFlashbackCluster(t *testing.T) {
store, dom := testkit.CreateMockStoreAndDomain(t)
originHook := dom.DDL().GetHook()
tk := testkit.NewTestKit(t, store)

time.Sleep(10 * time.Millisecond)
ts, err := tk.Session().GetStore().GetOracle().GetTimestamp(context.Background(), &oracle.Option{})
require.NoError(t, err)

Expand Down

0 comments on commit e95881f

Please sign in to comment.