Skip to content

Commit 76adece

Browse files
DeusDataShinken009
andcommitted
test(windows): keep MCP stdio guard cache and runtime under one temp root
The runtime dir was a sibling of the TemporaryDirectory (cache + "-runtime"), so it was never removed and its daemon lock files stayed in %TEMP%. Create cache/ and runtime/ under one owned temp root so both share its cleanup lifetime, including on failure. Refs #654. Co-authored-by: Shinken009 <[email protected]> Signed-off-by: Martin Vogel <[email protected]>
1 parent 193c60d commit 76adece

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/windows/test_mcp_stdio.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ def main():
1818
print("SETUP FAIL: CBM_TEST_BINARY is required", file=sys.stderr)
1919
return 2
2020

21-
with tempfile.TemporaryDirectory(prefix="cbm-mcp-stdio-") as cache:
22-
runtime = cache + "-runtime"
21+
with tempfile.TemporaryDirectory(prefix="cbm-mcp-stdio-") as work:
22+
cache = os.path.join(work, "cache")
23+
runtime = os.path.join(work, "runtime")
24+
os.makedirs(cache)
2325
os.makedirs(runtime)
2426
server = McpServer(binary, cache_dir=cache, extra_env={"CBM_RUNTIME_DIR": runtime})
2527
try:

0 commit comments

Comments
 (0)