From 44eb1fa894afcf2348c557fe2a18f1716de7fcc5 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 18 Oct 2023 11:13:18 +0800 Subject: [PATCH 1/2] *: simple code Signed-off-by: Weizhen Wang --- pkg/ddl/placement_policy_test.go | 2 +- pkg/executor/test/admintest/admin_test.go | 2 +- pkg/planner/core/plan_test.go | 2 +- .../handle/handletest/lockstats/lock_partition_stats_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/ddl/placement_policy_test.go b/pkg/ddl/placement_policy_test.go index efa873e0b69de..c3a95cce9bc1f 100644 --- a/pkg/ddl/placement_policy_test.go +++ b/pkg/ddl/placement_policy_test.go @@ -844,7 +844,7 @@ func TestCreateSchemaWithInfoPlacement(t *testing.T) { } func TestAlterRangePlacementPolicy(t *testing.T) { - store, _ := testkit.CreateMockStoreAndDomain(t) + store := testkit.CreateMockStore(t) tk := testkit.NewTestKit(t, store) tk.MustExec("create placement policy fiveReplicas followers=4") tk.MustExec("alter range global placement policy fiveReplicas") diff --git a/pkg/executor/test/admintest/admin_test.go b/pkg/executor/test/admintest/admin_test.go index 3b4b599c233a0..63c7bb4372965 100644 --- a/pkg/executor/test/admintest/admin_test.go +++ b/pkg/executor/test/admintest/admin_test.go @@ -1772,7 +1772,7 @@ func TestAdminCheckTableErrorLocateForClusterIndex(t *testing.T) { } func TestAdminCheckTableErrorLocateBigTable(t *testing.T) { - store, _ := testkit.CreateMockStoreAndDomain(t) + store := testkit.CreateMockStore(t) tk := testkit.NewTestKit(t, store) tk.MustExec("use test") diff --git a/pkg/planner/core/plan_test.go b/pkg/planner/core/plan_test.go index 456eb943af9de..c54839cc8a74f 100644 --- a/pkg/planner/core/plan_test.go +++ b/pkg/planner/core/plan_test.go @@ -772,7 +772,7 @@ func TestIssue47445(t *testing.T) { } func TestExplainValuesStatement(t *testing.T) { - store, _ := testkit.CreateMockStoreAndDomain(t) + store := testkit.CreateMockStore(t) tk := testkit.NewTestKit(t, store) tk.MustMatchErrMsg("EXPLAIN FORMAT = TRADITIONAL ((VALUES ROW ()) ORDER BY 1)", ".*Unknown table ''.*") diff --git a/pkg/statistics/handle/handletest/lockstats/lock_partition_stats_test.go b/pkg/statistics/handle/handletest/lockstats/lock_partition_stats_test.go index fbc176e151eaa..9dea979559380 100644 --- a/pkg/statistics/handle/handletest/lockstats/lock_partition_stats_test.go +++ b/pkg/statistics/handle/handletest/lockstats/lock_partition_stats_test.go @@ -263,7 +263,7 @@ func TestUnlockTheUnlockedTableWouldGenerateWarning(t *testing.T) { } func TestSkipLockALotOfPartitions(t *testing.T) { - store, _ := testkit.CreateMockStoreAndDomain(t) + store := testkit.CreateMockStore(t) tk := testkit.NewTestKit(t, store) tk.MustExec("set @@tidb_analyze_version = 1") tk.MustExec("use test") From ac6e796119c3e225d86dd3fa4f013b155e5fb897 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 18 Oct 2023 11:14:55 +0800 Subject: [PATCH 2/2] *: simple code Signed-off-by: Weizhen Wang --- pkg/planner/core/plan_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/planner/core/plan_test.go b/pkg/planner/core/plan_test.go index c54839cc8a74f..894fc966a9f35 100644 --- a/pkg/planner/core/plan_test.go +++ b/pkg/planner/core/plan_test.go @@ -756,7 +756,7 @@ func TestIssue40535(t *testing.T) { } func TestIssue47445(t *testing.T) { - store, _ := testkit.CreateMockStoreAndDomain(t) + store := testkit.CreateMockStore(t) tk := testkit.NewTestKit(t, store) tk.MustExec("use test;") tk.MustExec("CREATE TABLE golang1 ( `fcbpdt` CHAR (8) COLLATE utf8_general_ci NOT NULL, `fcbpsq` VARCHAR (20) COLLATE utf8_general_ci NOT NULL, `procst` char (4) COLLATE utf8_general_ci DEFAULT NULL,`cipstx` VARCHAR (105) COLLATE utf8_general_ci DEFAULT NULL, `cipsst` CHAR (4) COLLATE utf8_general_ci DEFAULT NULL, `dyngtg` VARCHAR(4) COLLATE utf8_general_ci DEFAULT NULL, `blncdt` VARCHAR (8) COLLATE utf8_general_ci DEFAULT NULL, PRIMARY KEY ( fcbpdt, fcbpsq ))")