Skip to content

Commit e28b2ef

Browse files
fix tests
1 parent 3b8dd83 commit e28b2ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/chrono_forge_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_kitchen_sink_runs_successfully
3838
"durably_execute$process_order",
3939
"durably_execute$complete_order",
4040
"$workflow_completion$"
41-
], workflow.execution_logs.pluck(:step_name)
41+
], workflow.execution_logs.order(:id).pluck(:step_name)
4242

4343
assert_equal 0, workflow.error_logs.size, "no errors should have occurred"
4444
end
@@ -73,7 +73,7 @@ def test_kitchen_sink_experiences_a_glitch
7373
"durably_execute$process_order",
7474
"durably_execute$complete_order",
7575
"$workflow_completion$"
76-
], workflow.execution_logs.pluck(:step_name)
76+
], workflow.execution_logs.order(:id).pluck(:step_name)
7777

7878
assert_equal 1, workflow.error_logs.size, "a single glitch should have occurred"
7979
assert_equal ["ChaoticJob::RetryableError"], workflow.error_logs.pluck(:error_class).uniq
@@ -108,8 +108,8 @@ def test_kitchen_sink_permanenty_fails
108108
"wait_until$payment_confirmed?",
109109
"wait$fraud_check_delay",
110110
"durably_execute$process_order"
111-
], workflow.execution_logs.pluck(:step_name).take(3)
112-
assert workflow.execution_logs.pluck(:step_name).last.starts_with?("$workflow_failure$")
111+
], workflow.execution_logs.order(:id).pluck(:step_name).take(3)
112+
assert workflow.execution_logs.order(:id).pluck(:step_name).last.starts_with?("$workflow_failure$")
113113

114114
assert_equal 4, workflow.error_logs.size, "workflow should have failed after 4 runs. 1 + 3 retries."
115115
assert_equal ["Permanent Failure"], workflow.error_logs.pluck(:error_message).uniq

0 commit comments

Comments
 (0)