Skip to content

Commit

Permalink
*: faster adminpause test (#45837)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Aug 31, 2023
1 parent 1cdd3f5 commit 7e66761
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ddl/tests/adminpause/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go_library(

go_test(
name = "adminpause_test",
timeout = "moderate",
timeout = "short",
srcs = [
"main_test.go",
"pause_cancel_test.go",
Expand Down
6 changes: 3 additions & 3 deletions ddl/tests/adminpause/pause_cancel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions ddl/tests/adminpause/pause_resume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 7e66761

Please sign in to comment.