Add comprehensive concurrent compilation and hot-reload testing infrastructure
to validate thread safety and file stability during race conditions.
## New Components
### AutoCompiler Helper (tests/helpers/AutoCompiler.{h,cpp})
- Automatically modifies source files to bump version numbers
- Compiles modules repeatedly on separate thread (15 iterations @ 1s interval)
- Tracks compilation success/failure rates with atomic counters
- Thread-safe compilation statistics
### Race Condition Test (tests/integration/test_04_race_condition.cpp)
- **3 concurrent threads:**
- Compiler: Recompiles TestModule.so every 1 second
- FileWatcher: Detects .so changes and triggers hot-reload with mutex protection
- Engine: Runs at 60 FPS with try_lock to skip frames during reload
- Validates module integrity (health status, version, configuration)
- Tracks metrics: compilation rate, reload success, corrupted loads, crashes
- 90-second timeout with progress monitoring
### TestModule Enhancements (tests/modules/TestModule.cpp)
- Added global moduleVersion variable for AutoCompiler modification
- Version bumping support for reload validation
## Test Results (Initial Implementation)
```
Duration: 88s
Compilations: 15/15 (100%) ✅
Reloads: ~30 (100% success) ✅
Corrupted: 0 ✅
Crashes: 0 ✅
File Stability: 328ms avg (proves >100ms wait) ✅
```
## Known Issue (To Fix in Next Commit)
- Module versions not actually changing during reload
- setConfiguration() overwrites compiled version
- Reload mechanism validated but version bumping needs fix
## Files Modified
- tests/CMakeLists.txt: Add AutoCompiler to helpers, add test_04
- tests/modules/TestModule.cpp: Add version bumping support
- .gitignore: Add build/ and logs/
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
459 B
JSON
26 lines
459 B
JSON
{
|
|
"mcpServers": {
|
|
"n8n-local": {
|
|
"command": "npx",
|
|
"args": [
|
|
"-y",
|
|
"supergateway@latest",
|
|
"--streamableHttp",
|
|
"http://localhost:3333/mcp",
|
|
"--oauth2Bearer",
|
|
"mon-super-token-secret-123",
|
|
"--logLevel",
|
|
"debug"
|
|
]
|
|
},
|
|
"blender": {
|
|
"command": "cmd",
|
|
"args": [
|
|
"/c",
|
|
"uvx",
|
|
"blender-mcp"
|
|
]
|
|
}
|
|
}
|
|
}
|