-
-
Couldn't load subscription status.
- Fork 6
Open
Description
Problem
The CLI integration test in crates/mandrel-mcp-th/tests/cli_run.rs is flaky and fails when run as part of the full test suite but passes when run individually.
Details
- Test:
test_cli_run_command_with_working_mcp_server - Issue: The test fails with exit code 1 showing "Total Tests: 6, Passed: 5, Failed: 1"
- Current Status: Temporarily ignored with
#[ignore]attribute - Root Cause: Likely resource contention or state interference between concurrent tests
Expected Behavior
The test should:
- Pass consistently whether run individually or as part of the full test suite
- Handle concurrent execution properly
- Not interfere with other MCP server tests
Error Details
When the test fails, it shows:
- Exit code: 1
- Output: "Total Tests: 6, Passed: 5, Failed: 1"
- One of the underlying filesystem operations in the MCP server is failing
Suggested Fixes
- Isolation: Ensure each test uses unique directories/ports to prevent conflicts
- Resource Cleanup: Improve cleanup of MCP server processes and temporary files
- Retry Logic: Add retry mechanism for flaky filesystem operations
- Test Ordering: Consider test dependencies and execution order
- Concurrent Limits: Limit concurrent MCP server instances
Priority
Medium - This affects CI/CD reliability but doesn't block development.
References
- Test file:
crates/mandrel-mcp-th/tests/cli_run.rs:58 - Related to MCP filesystem server integration testing
Metadata
Metadata
Assignees
Labels
No labels