From 3f71b91fb8d9e4734ff69b34fe42e339d2d49524 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 22 Sep 2026 12:59:28 +0200 Subject: [PATCH] The two-node bed's timeout report shows the node that did not answer, not always the second one --- test/integration/assigned-two-node-db.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/integration/assigned-two-node-db.test.ts b/test/integration/assigned-two-node-db.test.ts index 81391a1..a2fd3e9 100644 --- a/test/integration/assigned-two-node-db.test.ts +++ b/test/integration/assigned-two-node-db.test.ts @@ -150,12 +150,13 @@ async function settled(node: string, withinMs = 1_200_000): Promise { last = said; await new Promise((r) => setTimeout(r, 5000)); } - // Timed out — capture what the node is actually doing so the failure is diagnosable. - const ps = (await on(NODE, `docker ps -a --format '{{.Names}}\t{{.Status}}'`)).out; - const hostLog = (await on(NODE, `tail -80 /var/log/mesh-host.log`)).out; + // Timed out — capture what the node that did not answer is doing, so the failure is diagnosable. + // Its own machine, not the second node's: the anchor timing out used to print the laptop's log. + const ps = (await on(node, `docker ps -a --format '{{.Names}}\t{{.Status}}'`)).out; + const hostLog = (await on(node, `tail -80 /var/log/mesh-host.log`)).out; throw new Error( `${node} never caught up within ${Math.round(withinMs / 1000)}s.\nLast status:\n${last}\n` + - `--- ${NODE} docker ps -a ---\n${ps}\n--- ${NODE} mesh-host.log tail ---\n${hostLog}`); + `--- ${node} docker ps -a ---\n${ps}\n--- ${node} mesh-host.log tail ---\n${hostLog}`); } before(async () => {