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

fix(test): stop asserting strict-positive task duration in agentic-flow-agent tests (#3059)

rUvb3db018011c4
diff --git a/v3/@claude-flow/integration/src/__tests__/agentic-flow-agent.test.ts b/v3/@claude-flow/integration/src/__tests__/agentic-flow-agent.test.ts
index 48174d981a..01d57c1309 100644
--- a/v3/@claude-flow/integration/src/__tests__/agentic-flow-agent.test.ts
+++ b/v3/@claude-flow/integration/src/__tests__/agentic-flow-agent.test.ts
@@ -67,7 +67,8 @@ describe('AgenticFlowAgent', () => {
expect(result.success).toBe(true);
expect(result.taskId).toBe('task-1');
- expect(result.duration).toBeGreaterThan(0);
+ // Date.now()-based duration on a ~1ms task can legitimately read 0 under coarse CI clock resolution
+ expect(result.duration).toBeGreaterThanOrEqual(0);
expect(agent.metrics?.tasksCompleted).toBe(1);
});
@@ -100,7 +101,7 @@ describe('AgenticFlowAgent', () => {
});
expect(agent.metrics?.tasksCompleted).toBe(2);
- expect(agent.metrics?.avgTaskDuration).toBeGreaterThan(0);
+ expect(agent.metrics?.avgTaskDuration).toBeGreaterThanOrEqual(0);
});
});