Skip to content

Commit 06ab684

Browse files
committed
move dump to TestAddIndexDistPauseAndResume
1 parent 6840773 commit 06ab684

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/realtikvtest/addindextest1/disttask_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ func init() {
4848
}
4949

5050
func TestAddIndexDistBasic(t *testing.T) {
51-
var wg sync.WaitGroup
52-
wg.Add(1)
53-
dumpChan := make(chan struct{})
54-
defer func() {
55-
close(dumpChan)
56-
wg.Wait()
57-
}()
58-
go testkit.DebugDumpOnTimeout(&wg, dumpChan, 7*time.Minute)
59-
6051
// mock that we only have 1 cpu, add-index task can be scheduled as usual
6152
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/util/cpu/mockNumCpu", `return(1)`))
6253
require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/disttask/framework/storage/testSetLastTaskID", `return(true)`))
@@ -163,6 +154,15 @@ func TestAddIndexDistCancel(t *testing.T) {
163154
}
164155

165156
func TestAddIndexDistPauseAndResume(t *testing.T) {
157+
var wg sync.WaitGroup
158+
wg.Add(1)
159+
dumpChan := make(chan struct{})
160+
defer func() {
161+
close(dumpChan)
162+
wg.Wait()
163+
}()
164+
go testkit.DebugDumpOnTimeout(&wg, dumpChan, 1*time.Minute)
165+
166166
store, dom := realtikvtest.CreateMockStoreAndDomainAndSetup(t)
167167
if store.Name() != "TiKV" {
168168
t.Skip("TiKV store only")

0 commit comments

Comments
 (0)