mirror of
https://github.com/we-promise/sure.git
synced 2026-05-09 05:35:00 +00:00
Tighten retry exhaustion state handling
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com> Agent-Logs-Url: https://github.com/we-promise/sure/sessions/ea7a06f4-8344-4a00-877a-eda8cdfdc16a
This commit is contained in:
@@ -76,6 +76,18 @@ class SyncTest < ActiveSupport::TestCase
|
||||
assert_not_nil sync.failed_at
|
||||
end
|
||||
|
||||
test "fail_for_retry_exhaustion! marks syncing sync as failed" do
|
||||
sync = Sync.create!(syncable: accounts(:depository))
|
||||
sync.start!
|
||||
|
||||
sync.fail_for_retry_exhaustion!("rate limited too many times")
|
||||
|
||||
sync.reload
|
||||
assert_equal "failed", sync.status
|
||||
assert_equal "rate limited too many times", sync.error
|
||||
assert_not_nil sync.failed_at
|
||||
end
|
||||
|
||||
test "can run nested syncs that alert the parent when complete" do
|
||||
family = families(:dylan_family)
|
||||
plaid_item = plaid_items(:one)
|
||||
|
||||
Reference in New Issue
Block a user