test: remove multi-schema change from mock upgrade test (#50176)

close pingcap/tidb#49870
This commit is contained in:
tangenta
2024-01-09 10:16:53 +08:00
committed by GitHub
parent 1245c28b3b
commit c5fc682fbb
3 changed files with 19 additions and 11 deletions

2
.gitignore vendored
View File

@ -13,6 +13,7 @@ tests/integrationtest/integration-test.out
tests/integrationtest/integrationtest_tidb-server
tests/integrationtest/portgenerator
tests/integrationtest/s/
tests/integrationtest/replayer/
*.fail.go
tools/bin/
vendor
@ -39,3 +40,4 @@ bazel-tidb
*.log.json
genkeyword
test_coverage
coverage.dat

View File

@ -18,6 +18,7 @@ import (
"context"
"fmt"
"sort"
"strings"
"testing"
"time"
@ -334,6 +335,19 @@ func TestUpgrade(t *testing.T) {
require.Equal(t, 1, req.NumRows())
require.Equal(t, "False", req.GetRow(0).GetString(0))
require.NoError(t, r.Close())
r = MustExecToRecodeSet(t, se2, "admin show ddl jobs 1000;")
req = r.NewChunk(nil)
err = r.Next(ctx, req)
require.NoError(t, err)
rowCnt := req.NumRows()
for i := 0; i < rowCnt; i++ {
jobType := req.GetRow(i).GetString(3) // get job type.
// Should not use multi-schema change in bootstrap DDL because the job arguments may be changed.
require.False(t, strings.Contains(jobType, "multi-schema"))
}
require.NoError(t, r.Close())
dom.Close()
}
@ -518,15 +532,6 @@ func TestStmtSummary(t *testing.T) {
require.NoError(t, r.Close())
}
type bindTestStruct struct {
originText string
bindText string
db string
originWithDB string
bindWithDB string
deleteText string
}
func TestUpdateDuplicateBindInfo(t *testing.T) {
ctx := context.Background()
store, dom := CreateStoreAndBootstrap(t)

View File

@ -66,8 +66,9 @@ var allDDLs = []string{
"alter table mock_sys_t alter index idx_v invisible",
"alter table mock_sys_partition add partition (partition p6 values less than (8192))",
"alter table mock_sys_partition drop partition p6",
"alter table mock_sys_t add index mul_idx1(c1), add index mul_idx2(c1)",
"alter table mock_sys_t drop index mul_idx1, drop index mul_idx2",
// Should not use multi-schema change to add index in bootstrap DDL.
// "alter table mock_sys_t add index mul_idx1(c1), add index mul_idx2(c1)",
// "alter table mock_sys_t drop index mul_idx1, drop index mul_idx2",
// TODO: Support check the DB for ActionAlterPlacementPolicy.
// "alter database mock_sys_db_placement placement policy = 'alter_x'",
"alter table mock_sys_t add index rename_idx1(c1)",