Skip to content

test: cover the node status watcher under synctest - #753

Merged
CMGS merged 1 commit into
masterfrom
test/selfmon
Sep 9, 2026
Merged

test: cover the node status watcher under synctest#753
CMGS merged 1 commit into
masterfrom
test/selfmon

Conversation

@CMGS

@CMGS CMGS commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Test debt from the 2026-09 audit: the node status watcher had one test. These run it under testing/synctest, so the election retry, the keepalive expiry and the reconnect timer are exercised on the fake clock:

  • withActiveLock cancels the work when the ephemeral lock expires and unregisters; a lost election is retried every keepalive/4 until it wins.
  • run reconnects after the connection timeout and stops when the context ends.
  • replayDeadJournals keeps ticking past a service status error and never takes over on one.
  • initNodeStatus handles only unavailable nodes, at most nodeStatusHandlers at a time, and stops on a store error.
  • monitor returns ErrMessageChanClosed when the stream closes and the context error when it ends.
  • dealNodeStatusMessage sets workloads down only for dead nodes: alive and broken messages are dropped, a failed SetNode is swallowed.
  • RunNodeStatusWatcher returns when the context ends.

Tests only, no production change. Gates: build, vet, full tests, lint, fmt-check, asl on linux and darwin green.

withActiveLock cancels the work when the lock expires and retries a
lost election every keepalive/4; run reconnects after the connection
timeout; replayDeadJournals keeps ticking past a service status
error without a takeover; initNodeStatus handles only unavailable
nodes, at most nodeStatusHandlers at a time, and stops on a store
error; monitor returns when the stream closes or the context ends;
dealNodeStatusMessage sets workloads down only for dead nodes.
@CMGS
CMGS merged commit 611b907 into master Sep 9, 2026
7 checks passed
@CMGS
CMGS deleted the test/selfmon branch September 9, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant