mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
docs: add MongoDB pool settings and advanced test scripts
README.md: - Add MONGO_POOL_SIZE, MONGO_MIN_POOL_SIZE, MONGO_MAX_IDLE_TIME_MS to Core section for production tuning CONTRIBUTING.md: - Add 'Advanced Test Scripts' section documenting: - test:stress for concurrent write testing - test:flaky variants for detecting flaky tests - test:timing for finding slow tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -160,6 +160,27 @@ NODE_ENV=test npm run test:integration
|
||||
NODE_ENV=test npm test -- --grep "treatments"
|
||||
```
|
||||
|
||||
### Advanced Test Scripts
|
||||
|
||||
For diagnosing test issues and ensuring reliability:
|
||||
|
||||
```bash
|
||||
# Run stress tests for concurrent write operations
|
||||
NODE_ENV=test npm run test:stress
|
||||
|
||||
# Detect flaky tests by running multiple iterations
|
||||
NODE_ENV=test npm run test:flaky # Default iterations
|
||||
NODE_ENV=test npm run test:flaky:quick # 3 iterations
|
||||
NODE_ENV=test npm run test:flaky:thorough # 20 iterations
|
||||
|
||||
# Run specific flaky test harnesses
|
||||
NODE_ENV=test npm run test:flaky:entries # Entries isolation tests
|
||||
NODE_ENV=test npm run test:flaky:socket # Socket isolation tests
|
||||
|
||||
# Enable timing warnings to find slow tests
|
||||
NODE_ENV=test npm run test:timing
|
||||
```
|
||||
|
||||
You can create a `my.test.env` file based on `ci.test.env` for local testing:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user