Skip to content

Commit

Permalink
util/ddl-checker: fix DATA RACE in TestExecute
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Apr 7, 2022
1 parent 5c6248d commit d6b410c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/ddl-checker/executable_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ func TestExecute(t *testing.T) {
tk.MustExec("use test;")
for e := testData.Front(); e != nil; e = e.Next() {
data := e.Value.(parseTestData)
_, err := tk.Exec(data.sql)
res, err := tk.Exec(data.sql)
require.Equal(t, data.executeSucceeded, err == nil)
if res != nil {
res.Close()
}
}
}

0 comments on commit d6b410c

Please sign in to comment.