Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions changelog.d/integration-flake-take-over-recovery.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
### Maintenance
- The take-over integration test for an ordinary failed attach now holds its first bytes long
enough that a busy runner never takes the failing attempt's last line for an attach before its
exit arrives.
- Two take-over integration tests lengthen the attach hold, so a busy runner never passes on a
failing or displaced attach's last line before its exit arrives.
4 changes: 3 additions & 1 deletion server/take-over.contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ async function fixture(steps: Step[], attachHoldMs?: number) {

describe("explicit take-over intent", () => {
it("consumes a click when the running ordinary retry succeeds, before later displacement", async () => {
const f = await fixture([{ kind: "held" }, { kind: "real", gate: "attach" }, { kind: "held" }]);
// displaced, the attach prints herdr's "taken over" and then exits: a hold far longer than that
// exit keeps a busy runner from passing the line on before the exit comes
const f = await fixture([{ kind: "held" }, { kind: "real", gate: "attach" }, { kind: "held" }], 2_000);
await until(() => f.starts().length === 2, "ordinary retry held at its gate");
f.send({ type: "take-over", pane_id: f.paneId });
await f.barrier();
Expand Down
Loading