Skip to content

Commit b472b55

Browse files
committed
fix: tests
1 parent 1b163fd commit b472b55

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

spec/channel_batch_updater_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,15 @@ def wait_for_task(task_id, timeout_seconds: 120)
5252
when 'completed'
5353
return task
5454
when 'failed'
55-
raise "Task failed with result: #{task['result']}" unless rate_limit_error?(task)
56-
57-
sleep(2)
55+
# If result is empty, continue polling (matches Go behavior)
56+
result = task['result']
57+
if result.nil? || (result.is_a?(Hash) && result.empty?)
58+
sleep(2)
59+
elsif rate_limit_error?(task)
60+
sleep(2)
61+
else
62+
raise "Task failed with result: #{task['result']}"
63+
end
5864
end
5965
end
6066

0 commit comments

Comments
 (0)