Skip to content

test(status): add stale PID detection test for runStatus - #118

Merged
blaspat merged 1 commit into
mainfrom
test/status-stale-pid
Aug 10, 2026
Merged

test(status): add stale PID detection test for runStatus#118
blaspat merged 1 commit into
mainfrom
test/status-stale-pid

Conversation

@blaspat

@blaspat blaspat commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a regression test for the PID liveness check in runStatus. The check itself was already implemented (signal 0) but had no test coverage.

Test

TestRun_Status_StalePID:

  • Writes a status file with state: "connected" and a dead PID (99999)
  • Calls hermes-node status
  • Asserts output shows "stopped"not "connected" — proving the liveness check overrides the stale file

Closes #114

The PID liveness check (signal 0) was already implemented in runStatus
but had no test. This test writes a status file with state=connected
and a dead PID (99999), then asserts the output shows 'stopped' — not
'connected' — proving the liveness check overrides the stale file.

Closes #114

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
@blaspat
blaspat merged commit 44919a1 into main Aug 10, 2026
14 checks passed
@blaspat
blaspat deleted the test/status-stale-pid branch August 10, 2026 17: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.

CLI status file disagrees with server registry after crash/kill

1 participant