fix(rnd): Fix flaky CI

pull/7868/head^2
Zamil Majdy 2024-08-28 15:59:51 -05:00
parent b5db7f575e
commit 6ec200f912
1 changed files with 10 additions and 4 deletions

View File

@ -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