Skip to content

Commit c5002a1

Browse files
sirtimidclaude
andcommitted
test(kernel-node-runtime): fix flaky reconnection backoff e2e test
'handles reconnection with exponential backoff' timed out at 60s on some runs. The vat's sendRemoteMessage helper re-redeems the ocap URL on every call; with testBackoffOptions.ackTimeoutMs=2_000, the RemoteHandle gives up on redemption after ~8s (ackTimeoutMs × (MAX_RETRIES + 1)) — too short for kernel2 to finish its restart path (new DB connection + kernel init + libp2p + relay connection + vat launch) under load. Apply the same fix PR #927 used on the sibling tests: create a reconnectOptions bag overriding ackTimeoutMs to 5_000 (20s window), and thread it through both setupAliceAndBob and restartKernelAndReloadVat. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2175e11 commit c5002a1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

packages/kernel-node-runtime/test/e2e/remote-comms.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,22 @@ describe.sequential('Remote Communications E2E', () => {
407407
it(
408408
'handles reconnection with exponential backoff',
409409
async () => {
410+
// ackTimeoutMs must be long enough for kernel2 to restart + reconnect
411+
// before Alice's URL redemption gives up (fires after
412+
// ackTimeoutMs × (MAX_RETRIES + 1)). See PR #927 for the same fix
413+
// applied to sibling tests with this pattern.
414+
const reconnectOptions = {
415+
...testBackoffOptions,
416+
ackTimeoutMs: 5_000,
417+
};
418+
410419
const { aliceRef, bobURL } = await setupAliceAndBob(
411420
kernel1,
412421
kernel2,
413422
kernelStore1,
414423
kernelStore2,
415424
testRelays,
416-
testBackoffOptions,
425+
reconnectOptions,
417426
);
418427

419428
const initialMessage = await sendRemoteMessage(
@@ -445,7 +454,7 @@ describe.sequential('Remote Communications E2E', () => {
445454
false,
446455
testRelays,
447456
bobConfig,
448-
testBackoffOptions,
457+
reconnectOptions,
449458
);
450459
// eslint-disable-next-line require-atomic-updates
451460
kernel2 = restartResult.kernel;

0 commit comments

Comments
 (0)