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(rnd): Fix flaky CI

Zamil Majdy6ec200f912a3
diff --git a/rnd/autogpt_server/test/executor/test_manager.py b/rnd/autogpt_server/test/executor/test_manager.py
index 3cafa84f71..ecc315bf1a 100644
--- a/rnd/autogpt_server/test/executor/test_manager.py
+++ b/rnd/autogpt_server/test/executor/test_manager.py
@@ -39,20 +39,26 @@ async def assert_sample_graph_executions(
test_graph.id, graph_exec_id, test_user.id
)
+ output_list = [{"value": ["Hello"]}, {"value": ["World"]}]
+ input_list = [
+ {"value": "Hello", "name": "input_1"},
+ {"value": "World", "name": "input_2"},
+ ]
+
# Executing ValueBlock
exec = executions[0]
assert exec.status == execution.ExecutionStatus.COMPLETED
assert exec.graph_exec_id == graph_exec_id
- assert exec.output_data == {"value": ["Hello"]}
- assert exec.input_data == {"value": "Hello", "name": "input_1"}
+ assert exec.output_data in output_list
+ assert exec.input_data in input_list
assert exec.node_id in [test_graph.nodes[0].id, test_graph.nodes[1].id]
# Executing ValueBlock
exec = executions[1]
assert exec.status == execution.ExecutionStatus.COMPLETED
assert exec.graph_exec_id == graph_exec_id
- assert exec.output_data == {"value": ["World"]}
- assert exec.input_data == {"value": "World", "name": "input_2"}
+ assert exec.output_data in output_list
+ assert exec.input_data in input_list
assert exec.node_id in [test_graph.nodes[0].id, test_graph.nodes[1].id]
# Executing TextFormatterBlock