Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(agent_server): Fix async issue with executor integration test (#7348)

Swifty57cc8b69e979
diff --git a/rnd/autogpt_server/test/executor/test_manager.py b/rnd/autogpt_server/test/executor/test_manager.py
index 47a324c25c..ca3c696b5b 100644
--- a/rnd/autogpt_server/test/executor/test_manager.py
+++ b/rnd/autogpt_server/test/executor/test_manager.py
@@ -65,7 +65,13 @@ async def execute_graph(test_manager: ExecutionManager, test_graph: graph.Graph)
execs = await agent_server.get_run_execution_results(
test_graph.id, graph_exec_id
)
- return test_manager.queue.empty() and len(execs) == 4
+ return (
+ test_manager.queue.empty()
+ and len(execs) == 4
+ and all(
+ exec.status == execution.ExecutionStatus.COMPLETED for exec in execs
+ )
+ )
# Wait for the executions to complete
for i in range(10):