cultmesh-ts test: observe queued provider registers from creation so a client timeout is not an unhandled rejection
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 5m59s
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 5m59s
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
325da81428
commit
b55521d50d
1 changed files with 7 additions and 4 deletions
|
|
@ -287,18 +287,21 @@ test("a replaced RUDP generation drops operations queued behind an active handle
|
|||
runtimeId: identity.serviceInstanceId,
|
||||
connectionId,
|
||||
sessionToken: "signed-provider-token",
|
||||
operationTimeoutMs: 100,
|
||||
operationTimeoutMs: 1, // expires long before the test ends: the settle-by-timeout path is always exercised
|
||||
socketFactory: () => socket,
|
||||
}).connect(identity, new AbortController().signal);
|
||||
try {
|
||||
// The handler is held open and the closed generation never answers, so these two settle only by the
|
||||
// client's operation timeout or by connection.close(). Observe them from the start: whichever fires
|
||||
// first is a legitimate end of the call, and this test asserts on server-side handler calls, not on it.
|
||||
const first = connection.register(
|
||||
{ identity, requestedLeaseDurationMs: 10_000 },
|
||||
new AbortController().signal,
|
||||
);
|
||||
).then(() => undefined, () => undefined);
|
||||
const second = connection.register(
|
||||
{ identity, requestedLeaseDurationMs: 10_000 },
|
||||
new AbortController().signal,
|
||||
);
|
||||
).then(() => undefined, () => undefined);
|
||||
await waitFor(() => handlerCalls === 1, "first queued provider operation");
|
||||
|
||||
const replacement = new CultNetRudpSession({ connectionId });
|
||||
|
|
@ -318,7 +321,7 @@ test("a replaced RUDP generation drops operations queued behind an active handle
|
|||
assert.equal(handlerCalls, 1, "transport-queued work from the closed generation must be dropped");
|
||||
|
||||
connection.close();
|
||||
await Promise.allSettled([first, second]);
|
||||
await Promise.all([first, second]);
|
||||
} finally {
|
||||
connection.close();
|
||||
server.close();
|
||||
|
|
|
|||
Loading…
Reference in a new issue