Skip to content

fix: stabilize tests by managing node lifecycle - #194

Merged
bootjp merged 1 commit into
mainfrom
oj8pu0-codex/investigate-raft-node-connection-errors
Aug 9, 2025
Merged

fix: stabilize tests by managing node lifecycle#194
bootjp merged 1 commit into
mainfrom
oj8pu0-codex/investigate-raft-node-connection-errors

Conversation

@bootjp

Copy link
Copy Markdown
Owner

Summary

  • ensure test nodes shut down raft and transport
  • add raft and transport to Node for cleanup
  • wait for gRPC/Redis servers and Raft leader before tests run
  • replace net.DialTimeout usage with DialContext and Dialer timeout
  • use ListenConfig to create gRPC and Redis listeners
  • remove redundant ctx redefinition in test helper
  • connect test clients to leader node to avoid stale reads
  • log transport close errors in test cleanup

Testing

  • go test ./... (fails: TestRedis_follower_redirect_node_set_get_deleted)
  • golangci-lint run

https://chatgpt.com/codex/tasks/task_e_6897642fe61c83249418501609499b8d

@bootjp
bootjp merged commit 6629c40 into mainAug 9, 2025
6 of 7 checks passed
@bootjp
bootjp deleted the oj8pu0-codex/investigate-raft-node-connection-errors branch August 9, 2025 17:34
bootjp added a commit that referenced this pull request Apr 30, 2026
- Adapters fields are now *Adapter pointers (Gemini #98). Nil ->
excluded, non-nil empty -> included-with-no-scopes, non-nil
populated -> normal. Previous non-pointer struct collapsed both
"excluded" and "included-empty" into the same on-disk shape;
gemini's reference (don't silently drop entries during
serialization) was the right call. Test
TestAdaptersStruct_NilVsEmptyDistinguishedOnDisk covers it.
- KeymapReader.Next now validates the base64-encoded `original`
field at parse time (Codex P1 #179). Previously the JSON parsed
fine and the bad base64 surfaced lazily on Original() — that
defers corruption detection past initial ingest. Test
TestKeymapReader_RejectsMalformedBase64AtParseTime locks in the
parse-time validation.
- ReadManifest now rejects trailing bytes via dec.More() (Codex P2
#194). Two manifests concatenated, garbage tails, partial-write
artifacts: all surface as ErrInvalidManifest. Tests
TestReadManifest_RejectsTrailingBytes and
TestReadManifest_RejectsTrailingNonWhitespace.
- Test name TestKeymapReader_AcceptsBlankLinesByPolicy renamed to
TestKeymapReader_RejectsBlankLines (Gemini #160). The test was
already asserting rejection; only the name was misleading.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@bootjp