Skip to content

Commit

Permalink
fix broken scheduler test with new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau authored and ArnaudBger committed Mar 29, 2024
1 parent c63881e commit a284f11
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions orchestrator/stage/stages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,35 @@ S:.
M:N`)

j1, _ := stages.NextJob()
assert.Equal(t, 1, j1.Stage)
assert.Equal(t, 0, j1.Stage)
assert.Equal(t, 0, j1.Segment)

segmentStateEquals(t, stages, `
S:.
S:S
S:.
M:N`)

stages.forceTransition(0, 1, UnitCompleted)
stages.forceTransition(0, 0, UnitCompleted)

segmentStateEquals(t, stages, `
S:.
S:C
S:.
M:N`)

stages.NextJob()
assert.Equal(t, 0, j1.Stage)
assert.Equal(t, 0, j1.Segment)

segmentStateEquals(t, stages, `
S:S
S:C
S:S
M:N`)

stages.NextJob()

stages.forceTransition(0, 1, UnitCompleted)
segmentStateEquals(t, stages, `
S:SS
S:CS
S:C.
M:N.`)

Expand Down

0 comments on commit a284f11

Please sign in to comment.