Skip to content

Commit fc10aa9

Browse files
authored
Fix automation flaky test (baserow#5033)
1 parent a615b87 commit fc10aa9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

backend/tests/baserow/contrib/automation/workflows/test_workflow_handler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,12 +1166,15 @@ def test_async_start_workflow_rate_limited_runs_eventually_disable_workflow(
11661166

11671167
histories = list(
11681168
AutomationWorkflowHistory.objects.filter(workflow=original_workflow).order_by(
1169-
"started_on"
1169+
"started_on", "id"
11701170
)
11711171
)
11721172

11731173
assert len(histories) == 6
11741174

1175+
# We should have 6 successful call
1176+
assert mock_start_workflow_celery_task.delay.call_count == 2
1177+
11751178
assert histories[2].status == HistoryStatusChoices.ERROR
11761179
assert histories[2].message == (
11771180
"The workflow was rate limited due to too many recent or unfinished runs."
@@ -1191,9 +1194,6 @@ def test_async_start_workflow_rate_limited_runs_eventually_disable_workflow(
11911194
"The workflow was disabled due to too many consecutive errors."
11921195
)
11931196

1194-
# We should have 6 successful call
1195-
assert mock_start_workflow_celery_task.delay.call_count == 2
1196-
11971197
original_workflow.refresh_from_db()
11981198
published_workflow.refresh_from_db()
11991199

0 commit comments

Comments
 (0)