Skip to content

Commit cca7be9

Browse files
authored
test: fix the flaky test TestDeleteIgnoreWithFK (#57095) (#57097)
close #57094
1 parent 999befe commit cca7be9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/executor/delete_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ func TestDeleteIgnoreWithFK(t *testing.T) {
139139
tk.MustExec("insert into child2 values (1)")
140140
require.NotNil(t, tk.ExecToErr("delete from parent, parent2 using parent inner join parent2 where parent.a = parent2.a"))
141141
tk.MustExec("delete ignore from parent, parent2 using parent inner join parent2 where parent.a = parent2.a")
142-
tk.MustQuery("show warnings").Check(testkit.Rows(
143-
"Warning 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `fk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`))",
144-
"Warning 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child2`, CONSTRAINT `fk_1` FOREIGN KEY (`a`) REFERENCES `parent2` (`a`))"))
142+
tk.MustQuery("show warnings").Sort().Check(testkit.Rows(
143+
"Warning 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child2`, CONSTRAINT `fk_1` FOREIGN KEY (`a`) REFERENCES `parent2` (`a`))",
144+
"Warning 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `fk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`))"))
145145
tk.MustQuery("select * from parent").Check(testkit.Rows("1"))
146146
tk.MustQuery("select * from parent2").Check(testkit.Rows("1"))
147147

0 commit comments

Comments
 (0)