Skip to content

Commit

Permalink
fix ut TestRunningJobs
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Mar 7, 2024
1 parent 66ed429 commit 2089e71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ddl/ddl_running_jobs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,19 @@ func TestRunningJobs(t *testing.T) {
runnable = j.checkRunnable(mkJob(0, "db100.t100"))
require.False(t, runnable)

job5.State = model.JobStateDone
j.remove(job5)
require.Equal(t, "1,2,3,4", orderedAllIDs(j.allIDs()))
runnable = j.checkRunnable(mkJob(0, "db100.t100"))
require.True(t, runnable)

job3.State = model.JobStateDone
j.remove(job3)
require.Equal(t, "1,2,4", orderedAllIDs(j.allIDs()))
runnable = j.checkRunnable(mkJob(0, "db1.t100"))
require.True(t, runnable)

job1.State = model.JobStateDone
j.remove(job1)
require.Equal(t, "2,4", orderedAllIDs(j.allIDs()))
runnable = j.checkRunnable(mkJob(0, "db1.t1"))
Expand Down

0 comments on commit 2089e71

Please sign in to comment.