Skip to content

Commit ae4b286

Browse files
committed
Updated tests for CI trouble shooting, removed failpoint
1 parent 84e2e9d commit ae4b286

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ddl/db_partition_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ func TestAlterTableTruncatePartitionPreSplitRegion(t *testing.T) {
15901590

15911591
tk.MustExec("drop table if exists t1;")
15921592
tk.MustExec(`CREATE TABLE t1 (id int, c varchar(128), key c(c)) partition by range (id) (
1593-
partition p0 values less than (10),
1593+
partition p0 values less than (10),
15941594
partition p1 values less than MAXVALUE)`)
15951595
re := tk.MustQuery("show table t1 regions")
15961596
rows := re.Rows()
@@ -2570,7 +2570,7 @@ func TestExchangePartitionMultiTable(t *testing.T) {
25702570
tk3.MustExec(`insert into t1 values (1)`)
25712571
tk3.MustExec(`insert into t2 values (2)`)
25722572
tk3.MustExec(`insert into tp values (3)`)
2573-
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID", `pause`))
2573+
//require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID", `pause`))
25742574
go func() {
25752575
alterChan1 <- tk1.ExecToErr(`alter table tp exchange partition p0 with table t1`)
25762576
}()
@@ -2581,7 +2581,7 @@ func TestExchangePartitionMultiTable(t *testing.T) {
25812581
waitFor(11, "t2", "queueing")
25822582
tk3.MustExec(`rollback`)
25832583
logutil.BgLogger().Info("rollback done")
2584-
require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID"))
2584+
//require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID"))
25852585
require.NoError(t, <-alterChan1)
25862586
logutil.BgLogger().Info("alter1 done")
25872587
err := <-alterChan2

table/tables/partition_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,7 @@ func TestExchangePartitionStates(t *testing.T) {
724724
tk.MustExec(`insert into t values (1, "1")`)
725725
tk.MustExec(`insert into tp values (2, "2")`)
726726
tk.MustExec(`analyze table t,tp`)
727+
tk.MustQuery(`select * from information_schema.global_variables`).Check(testkit.Rows())
727728
var wg sync.WaitGroup
728729
wg.Add(1)
729730
dumpChan := make(chan struct{})
@@ -735,7 +736,7 @@ func TestExchangePartitionStates(t *testing.T) {
735736
tk.MustExec("BEGIN")
736737
tk.MustQuery(`select * from t`).Check(testkit.Rows("1 1"))
737738
tk.MustQuery(`select * from tp`).Check(testkit.Rows("2 2"))
738-
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID", `pause`))
739+
//require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID", `pause`))
739740
alterChan := make(chan error)
740741
go func() {
741742
// WITH VALIDATION is the default
@@ -769,7 +770,7 @@ func TestExchangePartitionStates(t *testing.T) {
769770
// MDL will block the alter to not continue until all clients
770771
// are in StateWriteOnly, which tk is blocking until it commits
771772
tk.MustExec(`COMMIT`)
772-
require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID"))
773+
//require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/ddl/exchangePartitionAutoID"))
773774
waitFor("t", "rollback done", 11)
774775
// MDL will block the alter from finish, tk is in 'rollbacked' schema version
775776
// but the alter is still waiting for tk3 to commit, before continuing

0 commit comments

Comments
 (0)