Skip to content

Commit

Permalink
executor: fix unstable test TestStaleReadPrepare (#44962)
Browse files Browse the repository at this point in the history
close #43269
  • Loading branch information
hawkingrei authored Jun 30, 2023
1 parent 8d6071a commit 7be8195
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions executor/stale_txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,11 @@ func TestStaleReadPrepare(t *testing.T) {

tk.MustExec("create table t1 (id int, v int)")
tk.MustExec("insert into t1 values (1,10)")
tk.MustExec("set @a=now(6)")
time.Sleep(5 * time.Millisecond)
time.Sleep(time.Millisecond)
tk.MustExec("begin")
tk.MustExec("set @a=tidb_parse_tso(@@tidb_current_ts)")
tk.MustExec("commit")
time.Sleep(3 * time.Millisecond)
tk.MustExec("update t1 set v=100 where id=1")
tk.MustQuery("select * from t1").Check(testkit.Rows("1 100"))
tk.MustExec("prepare s1 from 'select * from t1 as of timestamp @a where id=1'")
Expand Down

0 comments on commit 7be8195

Please sign in to comment.