CB-110: cover drop of a delivered-but-unpicked-up turn
Adds the drop test for the delivered/awaitingPickup/!turnObserved state (worker vanished after delivery but before a WORKING sample) — a gap the other two drop tests missed. Surfaced by an off-sub worker's code review of CB-110, delegated through the bridge itself.
This commit is contained in:
@@ -253,6 +253,20 @@ class InjectorTest {
|
||||
assertEquals(List.of(T), cap.failed, "a worker that vanishes mid-turn fails its in-flight send");
|
||||
}
|
||||
|
||||
@Test
|
||||
void dropFailsADeliveredTurnThatVanishesBeforePickupIsConfirmed() {
|
||||
// Delivered but no WORKING sampled yet (awaitingCompletion=true, awaitingPickup still true,
|
||||
// turnObserved=false) — a distinct state the other two drop tests don't cover. (Gap surfaced
|
||||
// by an off-sub worker's review of CB-110, delegated through the bridge.)
|
||||
Captor cap = new Captor();
|
||||
Injector inj = new Injector(new AgentControl(herdr), cap);
|
||||
inj.enqueue(T, "task");
|
||||
inj.onStatus(T, AgentStatus.IDLE); // deliver; pickup never confirmed
|
||||
|
||||
inj.drop(T, new HerdrException("worker gone", "pane_not_found", null));
|
||||
assertEquals(List.of(T), cap.failed, "a delivery that vanishes before pickup still fails its send");
|
||||
}
|
||||
|
||||
@Test
|
||||
void pollerDeliversToAnIdleWorker() throws Exception {
|
||||
// End-to-end through the poller: idle worker → message delivered without manual onStatus.
|
||||
|
||||
Reference in New Issue
Block a user