test: pass snapshot listings to the catch-up restart budget probe

Main now snapshots systemd unit listings before stopping old processes
and passes them into _restart_systemd_gateway_units_best_effort; the
catch-up budget test and eval call the new two-argument shape while
still asserting the unit's stop+start budget reaches the client timeout.
This commit is contained in:
Teknium
2026-09-07 07:18:12 -07:00
parent 08f2c78d92
commit 50cd1190ef
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ try:
try: try:
if catchup: if catchup:
failed = [] failed = []
fleet._restart_systemd_gateway_units_best_effort(failed) fleet._restart_systemd_gateway_units_best_effort(failed, list(fleet._systemd_gateway_unit_listings()))
record.update(failed_units=failed) record.update(failed_units=failed)
else: else:
result = _systemctl_reset_and_restart(cmd, unit) result = _systemctl_reset_and_restart(cmd, unit)
@@ -30,7 +30,7 @@ def test_unit_transaction_budget_preserves_scope_and_health(monkeypatch, gracefu
if catchup: if catchup:
monkeypatch.setattr(fleet, "_SYSTEMD_SCOPES", (("user", scope),)) monkeypatch.setattr(fleet, "_SYSTEMD_SCOPES", (("user", scope),))
failed = [] failed = []
fleet._restart_systemd_gateway_units_best_effort(failed) fleet._restart_systemd_gateway_units_best_effort(failed, list(fleet._systemd_gateway_unit_listings()))
assert not failed assert not failed
assert sum("restart" in cmd for cmd, _ in calls) == 1 assert sum("restart" in cmd for cmd, _ in calls) == 1
return return