From 7e66761047b01b62c4097892be14555f83a3c3b3 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 31 Aug 2023 16:30:39 +0800 Subject: [PATCH] *: faster adminpause test (#45837) --- ddl/tests/adminpause/BUILD.bazel | 2 +- ddl/tests/adminpause/pause_cancel_test.go | 6 +++--- ddl/tests/adminpause/pause_resume_test.go | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ddl/tests/adminpause/BUILD.bazel b/ddl/tests/adminpause/BUILD.bazel index 63b4c02ba0169..bd9f7c418d6a8 100644 --- a/ddl/tests/adminpause/BUILD.bazel +++ b/ddl/tests/adminpause/BUILD.bazel @@ -20,7 +20,7 @@ go_library( go_test( name = "adminpause_test", - timeout = "moderate", + timeout = "short", srcs = [ "main_test.go", "pause_cancel_test.go", diff --git a/ddl/tests/adminpause/pause_cancel_test.go b/ddl/tests/adminpause/pause_cancel_test.go index d3e9c80b97a72..02882e2788bca 100644 --- a/ddl/tests/adminpause/pause_cancel_test.go +++ b/ddl/tests/adminpause/pause_cancel_test.go @@ -165,7 +165,7 @@ func pauseAndCancelStmt(t *testing.T, stmtKit *testkit.TestKit, adminCommandKit func TestPauseCancelAndRerunSchemaStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range schemaDDLStmtCase { pauseAndCancelStmt(t, stmtKit, adminCommandKit, dom, &stmtCase) @@ -194,7 +194,7 @@ func TestPauseCancelAndRerunSchemaStmt(t *testing.T) { func TestPauseCancelAndRerunIndexStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range indexDDLStmtCase { pauseAndCancelStmt(t, stmtKit, adminCommandKit, dom, &stmtCase) @@ -208,7 +208,7 @@ func TestPauseCancelAndRerunIndexStmt(t *testing.T) { func TestPauseCancelAndRerunColumnStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range columnDDLStmtCase { pauseAndCancelStmt(t, stmtKit, adminCommandKit, dom, &stmtCase) diff --git a/ddl/tests/adminpause/pause_resume_test.go b/ddl/tests/adminpause/pause_resume_test.go index a611193639728..b989dfc7b797e 100644 --- a/ddl/tests/adminpause/pause_resume_test.go +++ b/ddl/tests/adminpause/pause_resume_test.go @@ -211,7 +211,7 @@ func pauseResumeAndCancel(t *testing.T, stmtKit *testkit.TestKit, adminCommandKi func TestPauseAndResumeSchemaStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range schemaDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, false) @@ -230,7 +230,7 @@ func TestPauseAndResumeSchemaStmt(t *testing.T) { func TestPauseAndResumeIndexStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range indexDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, false) @@ -242,7 +242,7 @@ func TestPauseAndResumeIndexStmt(t *testing.T) { func TestPauseAndResumeColumnStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range columnDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, false) @@ -267,7 +267,7 @@ func TestPauseAndResumePartitionTableStmt(t *testing.T) { func TestPauseResumeCancelAndRerunSchemaStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range schemaDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, true) @@ -297,7 +297,7 @@ func TestPauseResumeCancelAndRerunSchemaStmt(t *testing.T) { func TestPauseResumeCancelAndRerunIndexStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range indexDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, true) @@ -312,7 +312,7 @@ func TestPauseResumeCancelAndRerunIndexStmt(t *testing.T) { func TestPauseResumeCancelAndRerunColumnStmt(t *testing.T) { var dom, stmtKit, adminCommandKit = prepareDomain(t) - require.Nil(t, generateTblUser(stmtKit, 1000)) + require.Nil(t, generateTblUser(stmtKit, 500)) for _, stmtCase := range columnDDLStmtCase { pauseResumeAndCancel(t, stmtKit, adminCommandKit, dom, &stmtCase, true)