fix(utils): preserve exact newlines in atomic text writes (#6475)
* fix(utils): preserve exact newlines in atomic text writes * test(updates): allow time for confirmed Windows upgrade completion
This commit is contained in:
1 parent
0978ccd50f
commit
c4dac649da
3 files changed
+11
-6
No files matched your search
@@ -1539,8 +1539,10 @@ async def test_stale_first_supervisor_cannot_take_new_confirmation(managed_insta
|
||||
assert not (directory / "approval.json").exists()
|
||||
assert not (installation_state_dir(spec.baseline.environment) / "stop.json").exists()
|
||||
# B retains its first supervision budget and completes the explicit retry.
|
||||
# This path performs a real backup, pip install, restart and snapshot cleanup.
|
||||
# Parallel Windows runners can exceed the stale-launcher's 40s rejection budget.
|
||||
try:
|
||||
completed = await asyncio.to_thread(subprocess.run, [*command, current.id], capture_output=True, timeout=40)
|
||||
completed = await asyncio.to_thread(subprocess.run, [*command, current.id], capture_output=True, timeout=120)
|
||||
except subprocess.TimeoutExpired:
|
||||
# Identify the blocked phase without exposing the confirmation nonce or
|
||||
# making a slow snapshot indistinguishable from a handoff deadlock.
|
||||
@@ -1549,7 +1551,7 @@ async def test_stale_first_supervisor_cannot_take_new_confirmation(managed_insta
|
||||
"mutation_started": status.mutation_started, "message": status.message,
|
||||
"snapshot_complete": (directory / "program-backup.json").exists(),
|
||||
"activation_complete": (directory / "activation.json").exists()}
|
||||
pytest.fail(f"Confirmed supervisor exceeded 40s: {progress}", pytrace=False)
|
||||
pytest.fail(f"Confirmed supervisor exceeded 120s: {progress}", pytrace=False)
|
||||
assert completed.returncode == 0, completed.stderr.decode()
|
||||
assert read_record(directory / "supervision.json")["confirmation_id"] == current.id
|
||||
assert JobStatus.read(directory).phase == Phase.SUCCEEDED
|
||||
|
||||
Reference in new issue
Block a user