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(codex): wait for both bridge startup streams

Rudy Celekli69a3d421478c
diff --git a/ruflo/tests/codex-mcp-backend-3509.test.mjs b/ruflo/tests/codex-mcp-backend-3509.test.mjs
index 79a4a97cc2..c3f3d9d640 100644
--- a/ruflo/tests/codex-mcp-backend-3509.test.mjs
+++ b/ruflo/tests/codex-mcp-backend-3509.test.mjs
@@ -46,7 +46,9 @@ for (const relativePath of bridges) {
child.stdout.on('data', chunk => { stdout += chunk; });
child.stderr.on('data', chunk => { stderr += chunk; });
const deadline = Date.now() + 3000;
- while (Date.now() < deadline && !stderr.includes('Codex CLI has no MCP server mode')) {
+ // stderr can reach the parent before stdout; wait for both startup signals.
+ while (Date.now() < deadline &&
+ (!stderr.includes('Codex CLI has no MCP server mode') || !/Active groups: core\s*$/m.test(stdout))) {
await new Promise(resolve => setTimeout(resolve, 25));
}
assert.match(stdout, /Active groups: core\s*$/m, `stdout: ${stdout}\nstderr: ${stderr}`);