Add test for releasing connections back to the server
This commit is contained in:
11
design.md
11
design.md
@@ -298,7 +298,16 @@ This write-side component is designed to integrate with:
|
||||
- **Configuration**: All configuration is TOML-based using `config.toml` (see `config.md`)
|
||||
- **Testing Strategy**: Run unit tests, benchmarks, and debug tools before submitting changes
|
||||
- **Build System**: CMake generates gperf hash tables at build time; always use ninja
|
||||
- **Test Synchronization**: NEVER use sleep() for test synchronization - it makes tests slow and flaky. Use proper synchronization primitives like std::latch (C++20), condition variables, or promises/futures instead
|
||||
- **Test Synchronization**:
|
||||
- **ABSOLUTELY NEVER use sleep(), std::this_thread::sleep_for(), or any timeout-based waiting in tests**
|
||||
- **NEVER use condition_variable.wait_for() or other timeout variants**
|
||||
- Use deterministic synchronization only:
|
||||
- **Blocking I/O** (blocking read/write calls that naturally wait)
|
||||
- **condition_variable.wait()** with no timeout (waits indefinitely until condition is met)
|
||||
- **std::latch, std::barrier, futures/promises** for coordination
|
||||
- **RAII guards and resource management** for cleanup
|
||||
- Tests should either pass (correct) or hang forever (indicates real bug to investigate)
|
||||
- No timeouts, no flaky behavior, no false positives/negatives
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user