test(maintenance): the swarm job's boot comes after the reboot the settle hands out (#6098)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,8 +53,8 @@ def test_a_swarm_node_is_drained_rebooted_and_made_active_again():
|
|||||||
assert m.settle(job, T0 + timedelta(minutes=5))
|
assert m.settle(job, T0 + timedelta(minutes=5))
|
||||||
assert job.state == "rebooting" and m.executor(job) == "h1"
|
assert job.state == "rebooting" and m.executor(job) == "h1"
|
||||||
assert m.handoff(job) == {"id": "job-1-reboot", "action": "reboot"}
|
assert m.handoff(job) == {"id": "job-1-reboot", "action": "reboot"}
|
||||||
t1 = T0 + timedelta(minutes=4)
|
t1 = T0 + timedelta(minutes=9) # the reboot went out at T0+5
|
||||||
assert m.apply_boot(job, T0 + timedelta(minutes=2), t1)
|
assert m.apply_boot(job, T0 + timedelta(minutes=7), t1)
|
||||||
assert job.state == "undraining" and job.back_at == t1 and m.executor(job) == "mgr"
|
assert job.state == "undraining" and job.back_at == t1 and m.executor(job) == "mgr"
|
||||||
m.apply_result(job, _result(job, "done", ok=True), t1)
|
m.apply_result(job, _result(job, "done", ok=True), t1)
|
||||||
assert job.state == "done"
|
assert job.state == "done"
|
||||||
|
|||||||
Reference in New Issue
Block a user