Skip to content

Commit

Permalink
move dump to TestAddIndexDistPauseAndResume
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Dec 19, 2023
1 parent 6840773 commit 06ab684
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/realtikvtest/addindextest1/disttask_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ func init() {
}

func TestAddIndexDistBasic(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
dumpChan := make(chan struct{})
defer func() {
close(dumpChan)
wg.Wait()
}()
go testkit.DebugDumpOnTimeout(&wg, dumpChan, 7*time.Minute)

// mock that we only have 1 cpu, add-index task can be scheduled as usual
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/util/cpu/mockNumCpu", `return(1)`))
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/disttask/framework/storage/testSetLastTaskID", `return(true)`))
Expand Down Expand Up @@ -163,6 +154,15 @@ func TestAddIndexDistCancel(t *testing.T) {
}

func TestAddIndexDistPauseAndResume(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
dumpChan := make(chan struct{})
defer func() {
close(dumpChan)
wg.Wait()
}()
go testkit.DebugDumpOnTimeout(&wg, dumpChan, 1*time.Minute)

store, dom := realtikvtest.CreateMockStoreAndDomainAndSetup(t)
if store.Name() != "TiKV" {
t.Skip("TiKV store only")
Expand Down

0 comments on commit 06ab684

Please sign in to comment.