From b3d7b0ec292010aad762077ea9a2a1dc347bb924 Mon Sep 17 00:00:00 2001 From: xhe Date: Wed, 16 Jun 2021 19:41:27 +0800 Subject: [PATCH] executor: stable tests Signed-off-by: xhe --- executor/batch_point_get_test.go | 3 ++- executor/point_get_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/executor/batch_point_get_test.go b/executor/batch_point_get_test.go index f515a6848c72b..114134ac61513 100644 --- a/executor/batch_point_get_test.go +++ b/executor/batch_point_get_test.go @@ -355,7 +355,8 @@ func (s *testBatchPointGetSuite) TestBatchPointGetIssue25167(c *C) { defer func() { tk.MustExec("drop table if exists t") }() - tk.MustExec("set @a=(select current_timestamp(6))") + time.Sleep(50 * time.Millisecond) + tk.MustExec("set @a=(select current_timestamp(3))") tk.MustExec("insert into t values (1)") tk.MustQuery("select * from t as of timestamp @a where a in (1,2,3)").Check(testkit.Rows()) } diff --git a/executor/point_get_test.go b/executor/point_get_test.go index 7bac00d4b012e..721d7dc00bcb9 100644 --- a/executor/point_get_test.go +++ b/executor/point_get_test.go @@ -953,7 +953,8 @@ func (s *testPointGetSuite) TestPointGetIssue25167(c *C) { defer func() { tk.MustExec("drop table if exists t") }() - tk.MustExec("set @a=(select current_timestamp(6))") + time.Sleep(50 * time.Millisecond) + tk.MustExec("set @a=(select current_timestamp(3))") tk.MustExec("insert into t values (1)") tk.MustQuery("select * from t as of timestamp @a where a = 1").Check(testkit.Rows()) }