From 4abe75572606fb1892b7cd07ff5b77861ecd7d49 Mon Sep 17 00:00:00 2001 From: ti-srebot <66930949+ti-srebot@users.noreply.github.com> Date: Fri, 4 Jun 2021 18:24:28 +0800 Subject: [PATCH] executor: Fix unstable TestTiDBLastTxnInfoCommitMode (#24779) (#25160) --- executor/executor_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/executor/executor_test.go b/executor/executor_test.go index bdf859b04ef64..ca557d742f211 100644 --- a/executor/executor_test.go +++ b/executor/executor_test.go @@ -3056,9 +3056,10 @@ func (s *testSerialSuite) TestTiDBLastTxnInfoCommitMode(c *C) { c.Assert(rows[0][1], Equals, "false") c.Assert(rows[0][2], Equals, "false") - config.UpdateGlobal(func(conf *config.Config) { - conf.TiKVClient.AsyncCommit.SafeWindow = 0 - }) + c.Assert(failpoint.Enable("github.com/pingcap/tidb/store/tikv/invalidMaxCommitTS", "return"), IsNil) + defer func() { + c.Assert(failpoint.Disable("github.com/pingcap/tidb/store/tikv/invalidMaxCommitTS"), IsNil) + }() tk.MustExec("set @@tidb_enable_async_commit = 1") tk.MustExec("set @@tidb_enable_1pc = 0")