Skip to content

Commit

Permalink
ddl: make TestHalfwayCancelOperations faster (#48251)
Browse files Browse the repository at this point in the history
close #46840
  • Loading branch information
zimulala authored Nov 3, 2023
1 parent e392766 commit 0cca59f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/ddl/tests/fail/fail_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ func TestHalfwayCancelOperations(t *testing.T) {
tk.MustExec("use cancel_job_db")
tk.MustExec("select * from tx")
// test for exchanging partition
limit := variable.GetDDLErrorCountLimit()
variable.SetDDLErrorCountLimit(3)
defer func() {
variable.SetDDLErrorCountLimit(limit)
}()
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/ddl/exchangePartitionErr", `return(true)`))
defer func() {
require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/pkg/ddl/exchangePartitionErr"))
Expand Down

0 comments on commit 0cca59f

Please sign in to comment.