Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

test(hive-mind): isolate the e2e HTTP server's pid file from concurrent MCP tests

ruv8a639cd4f3e3
diff --git a/v3/@claude-flow/cli/__tests__/hive-mind-gate-transport-e2e.test.ts b/v3/@claude-flow/cli/__tests__/hive-mind-gate-transport-e2e.test.ts
index 82e0717736..ec44f37b56 100644
--- a/v3/@claude-flow/cli/__tests__/hive-mind-gate-transport-e2e.test.ts
+++ b/v3/@claude-flow/cli/__tests__/hive-mind-gate-transport-e2e.test.ts
@@ -34,11 +34,19 @@ afterEach(() => {
function env(extra: Record<string, string> = {}) {
dir = fs.mkdtempSync(path.join(os.tmpdir(), 'hive-e2e-'));
+ // The HTTP server's pid file lives in os.tmpdir() and is machine-wide, so a
+ // concurrent server from another test file (mcp-http-protocol-tools-2990)
+ // makes `mcp start` exit 1 ("already running"). Give this run its own tmpdir.
+ const tmp = path.join(dir, 'tmp');
+ fs.mkdirSync(tmp, { recursive: true });
return {
...process.env,
CLAUDE_FLOW_CWD: dir,
CLAUDE_FLOW_MCP_TOOLS: 'all',
RUFLO_DAEMON_AUTOSTART: '0',
+ TMPDIR: tmp,
+ TEMP: tmp,
+ TMP: tmp,
...extra,
};
}