chore: get or remove by states

This commit is contained in:
Noah Hsu
2022-06-23 21:19:01 +08:00
parent 6c61f1d261
commit 92983aa185
5 changed files with 26 additions and 14 deletions

View File

@ -61,7 +61,7 @@ func TestDown(t *testing.T) {
for {
tsk := tasks[0]
t.Logf("task: %+v", tsk)
if tsk.GetState() == task.FINISHED {
if tsk.GetState() == task.Succeeded {
break
}
if tsk.GetState() == task.ERRORED {
@ -75,7 +75,7 @@ func TestDown(t *testing.T) {
}
tsk := transferTaskManager.GetAll()[0]
t.Logf("task: %+v", tsk)
if tsk.GetState() == task.FINISHED {
if tsk.GetState() == task.Succeeded {
break
}
if tsk.GetState() == task.ERRORED {