From d2d44b255e30e534151b3ef338f4b7b987f632c8 Mon Sep 17 00:00:00 2001 From: xuhuaiyu <391585975@qq.com> Date: Tue, 22 Sep 2020 14:18:58 +0800 Subject: [PATCH] executor: fix data race in test --- executor/join_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/executor/join_test.go b/executor/join_test.go index 4a3f97a143a3c..0a52aa8b94899 100644 --- a/executor/join_test.go +++ b/executor/join_test.go @@ -2094,8 +2094,14 @@ func (s *testSuiteJoinSerial) TestInlineProjection4HashJoinIssue15316(c *C) { } func (s *testSuiteJoinSerial) TestIssue18070(c *C) { - config.GetGlobalConfig().OOMAction = config.OOMActionCancel - defer func() { config.GetGlobalConfig().OOMAction = config.OOMActionLog }() + config.UpdateGlobal(func(conf *config.Config) { + conf.OOMAction = config.OOMActionCancel + }) + defer func() { + config.UpdateGlobal(func(conf *config.Config) { + conf.OOMAction = config.OOMActionLog + }) + }() tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists t1, t2")