Skip to content

Commit 4aa4309

Browse files
test(server): bound the host-sleep release loop
A regression that keeps the session live now fails the deadline assertion instead of running until the test timeout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 5155681 commit 4aa4309

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/ProviderSessionManager.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3743,7 +3743,8 @@ const idleDeadlineAcrossHostSleep = (input: {
37433743
sleptMs = input.timerCountsSleep ? input.sleepMs - untilDeadlineMs : input.sleepMs;
37443744
yield* TestClock.adjust(untilDeadlineMs);
37453745
let deadline = Math.ceil(input.awakeMs / HOST_SLEEP_IDLE_MS);
3746-
while (yield* manager.isLive(providerSessionId)) {
3746+
for (let checked = 0; yield* manager.isLive(providerSessionId); checked += 1) {
3747+
if (checked === 5) return Number.POSITIVE_INFINITY;
37473748
deadline += 1;
37483749
yield* TestClock.adjust(HOST_SLEEP_IDLE_MS);
37493750
}

0 commit comments

Comments
 (0)