cultnet-ts: tests for two tracker mutants (send expires other windows; non-answer frames settle nothing)
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 5m28s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 51s
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 5m28s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 51s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6c42c66750
commit
8dc75c5522
1 changed files with 15 additions and 0 deletions
|
|
@ -159,6 +159,21 @@ test("tracker: re-sending a known id is the same write and does not restart its
|
|||
assert.equal(t.state("w1")?.outcome, "unconfirmed");
|
||||
});
|
||||
|
||||
test("tracker: a send past another write's window settles that write at once", () => {
|
||||
const { t, told } = tracker();
|
||||
t.send("w1", 0);
|
||||
t.send("w2", 600);
|
||||
assert.deepEqual(told, [["w1", { outcome: "unconfirmed", reason: "window_elapsed" }]]);
|
||||
});
|
||||
|
||||
test("tracker: only receipt and error frames answer; any other frame naming the id settles nothing", () => {
|
||||
const { t } = tracker();
|
||||
t.send("w1", 0);
|
||||
t.frame({ schemaVersion: "cultnet.hello.v0", runtimeId: "r", runtimeKind: "k" }, 1);
|
||||
t.frame({ schemaVersion: "cultnet.document_put_raw.v0", messageId: "w1" } as unknown as CultNetMessage, 2);
|
||||
assert.equal(t.state("w1")?.outcome, "pending");
|
||||
});
|
||||
|
||||
test("tracker: nextDeadlineMs reports the nearest unanswered window, none when all settled", () => {
|
||||
const { t } = tracker();
|
||||
assert.equal(t.nextDeadlineMs(0), undefined);
|
||||
|
|
|
|||
Loading…
Reference in a new issue