cultmesh-ts: a put completes on its result frame, not on the transport ack #55
1 changed files with 10 additions and 0 deletions
|
|
@ -71,6 +71,16 @@ const orders: Order[] = ["ack-then-refusal", "refusal-then-ack"];
|
|||
let nextConnection = 0x10205000;
|
||||
|
||||
for (const order of orders) {
|
||||
test(`publishRudpDocumentOnce does not complete on the ack of a refused put (${order})`, async () => {
|
||||
const peer = await refusingPeer(nextConnection, order);
|
||||
try {
|
||||
await assert.rejects(
|
||||
CultMesh.publishRudpDocumentOnce("completion-once", nextConnection++, peer.endpoint, binding, "tests:completion:a", { noteId: "a", text: "x" }, { resendDelayMs: 50, resendPollMs: 5, flushTimeoutMs: 2_000 }),
|
||||
/./,
|
||||
);
|
||||
} finally { peer.close(); }
|
||||
});
|
||||
|
||||
test(`publishRudpDocumentAndWaitForReceipt reports a refused put as refused, never as success (${order})`, async () => {
|
||||
const peer = await refusingPeer(nextConnection, order);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue