-
Notifications
You must be signed in to change notification settings - Fork 2
fix: stabilize tests by managing node lifecycle #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR stabilizes tests by properly managing the lifecycle of distributed system components, specifically ensuring clean shutdown of Raft consensus and transport layers. The changes address test flakiness by adding proper cleanup mechanisms and waiting for system readiness before tests proceed.
- Add Raft and transport manager references to Node struct for proper cleanup
- Implement proper shutdown sequence for Raft and transport components
- Replace fixed sleep with dynamic readiness checks for gRPC/Redis servers and Raft leader election
| } | ||
| if n.tm != nil { | ||
| if err := n.tm.Close(); err != nil { | ||
| log.Printf("error closing transport: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
undefined: log (typecheck)
| } | ||
| if n.tm != nil { | ||
| if err := n.tm.Close(); err != nil { | ||
| log.Printf("error closing transport: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
undefined: log) (typecheck)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Testing
go test ./...https://chatgpt.com/codex/tasks/task_e_6897642fe61c83249418501609499b8d