Skip to content

Commit cd7d076

Browse files
committed
nil check in call utils
1 parent 1e3b14c commit cd7d076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/call_utils.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ def get_manteca_test_status(test_id)
4141
def cleanup_calls(calls, calls_api)
4242
attempts = 0
4343

44-
while (calls.length > 0 && attempts < 10)
44+
while (calls&.length > 0 && attempts < 10)
4545
calls.delete_if { |call_id| call_ended(call_id, calls_api) }
4646
sleep(SLEEP_TIME_S)
4747
attempts += 1
4848
end
4949

50-
if (calls.length > 0)
50+
if (calls&.length > 0)
5151
error_message = 'Failed to terminate all calls' + calls.to_s
5252
raise StandardError.new error_message
5353
end

0 commit comments

Comments
 (0)