feat(k1): complete primary acquisition lifecycle
This commit is contained in:
@@ -603,6 +603,25 @@ test("replay coordinator makes rapid saved-session selection latest-request-wins
|
||||
coordinator.cancel();
|
||||
assert.equal(third.signal.aborted, true);
|
||||
assert.equal(third.isCurrent(), false);
|
||||
assert.equal(third.finish(), true);
|
||||
assert.equal(third.finish(), false);
|
||||
});
|
||||
|
||||
test("an acquisition guard cancellation keeps settlement ownership", () => {
|
||||
const coordinator = createObservationReplayCoordinator();
|
||||
const archiveSwitch = coordinator.begin();
|
||||
let replacementBlanked = false;
|
||||
let replacementSettled = false;
|
||||
|
||||
// Models the point after onReplayBegin has released the previous viewer.
|
||||
replacementBlanked = true;
|
||||
coordinator.cancel();
|
||||
|
||||
assert.equal(archiveSwitch.signal.aborted, true);
|
||||
assert.equal(archiveSwitch.isCurrent(), false);
|
||||
if (archiveSwitch.finish()) replacementSettled = true;
|
||||
assert.equal(replacementBlanked, true);
|
||||
assert.equal(replacementSettled, true);
|
||||
});
|
||||
|
||||
test("switching saved sessions aborts only local polling and never cancels shared backend work", async () => {
|
||||
|
||||
Reference in New Issue
Block a user