Commit 4742fc8
test: Add comprehensive workspace isolation test suite for PR HKUDS#2366
Why this change is needed:
PR HKUDS#2366 introduces critical workspace isolation functionality to resolve
multi-instance concurrency issues, but lacks comprehensive automated tests
to validate the implementation. Without proper test coverage, we cannot
ensure the feature works correctly across all scenarios mentioned in the PR.
What this test suite covers:
1. Pipeline Status Isolation: Verifies different workspaces maintain
independent pipeline status without interference
2. Lock Mechanism: Validates the new keyed lock system works correctly
- Different workspaces can acquire locks in parallel
- Same workspace locks serialize properly
- No deadlocks occur
3. Backward Compatibility: Ensures legacy code without workspace parameters
continues to work using default workspace
4. Multi-Workspace Concurrency: Confirms multiple LightRAG instances with
different workspaces can run concurrently without data interference
Testing approach:
- All tests are automated and deterministic
- Uses timing assertions to verify parallel vs serial lock behavior
- Validates data isolation through direct namespace data inspection
- Comprehensive error handling and detailed test output
Test results:
All 9 test cases passed successfully, confirming the workspace isolation
feature is working correctly across all key scenarios.
Impact:
Provides confidence that PR HKUDS#2366's workspace isolation feature is
production-ready and won't introduce regressions.1 parent cdd53ee commit 4742fc8
1 file changed
+473
-0
lines changed
0 commit comments