Intermittent mesh test timeouts (heartbeat, integration) #121

Closed
opened 2026-10-10 16:55:49 +00:00 by chrnx · 1 comment
Owner

Two Node tests fail intermittently with a 5 s timeout. They were seen while running the full suite repeatedly during the work on core #117:

  • test/mesh/heartbeat.test.ts › 'does not ping before the handshake completes': failed 1 of 5 full runs.
  • test/mesh/integration.test.ts: failed about 1 in 25 full runs on the branch.

On unmodified develop, the full suite also failed about 1 in 15 runs, but the failing test wasn't captured, so it's not yet proven to be the same one. Both files pass every time when run on their own, which points to timing under load or shared state between test files.

To do:

  • Reproduce with npx vitest run --repeat, or by looping the full suite.
  • Find the race: timer-based waits, or ports and servers that aren't torn down.
  • Fix it, or replace sleeps with event-driven waits.
Two Node tests fail intermittently with a 5 s timeout. They were seen while running the full suite repeatedly during the work on core #117: - `test/mesh/heartbeat.test.ts` › 'does not ping before the handshake completes': failed 1 of 5 full runs. - `test/mesh/integration.test.ts`: failed about 1 in 25 full runs on the branch. On unmodified `develop`, the full suite also failed about 1 in 15 runs, but the failing test wasn't captured, so it's not yet proven to be the same one. Both files pass every time when run on their own, which points to timing under load or shared state between test files. To do: - Reproduce with `npx vitest run --repeat`, or by looping the full suite. - Find the race: timer-based waits, or ports and servers that aren't torn down. - Fix it, or replace sleeps with event-driven waits.
Author
Owner

Moved to GitHub: https://github.com/Expressive-Tea/green-tea/issues/59. Development now happens there.

Moved to GitHub: https://github.com/Expressive-Tea/green-tea/issues/59. Development now happens there.
chrnx closed this issue 2026-11-18 03:56:02 +00:00
Sign in to join this conversation.