Skip to content

Commit

Permalink
Extract Method to replace Comment
Browse files Browse the repository at this point in the history
Issue #410
  • Loading branch information
camelpunch authored and michaelklishin committed Jun 22, 2016
1 parent d222229 commit cf08b1c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions spec/higher_level_api/integration/connection_recovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

def close_all_connections!
http_client.list_connections.each do |conn_info|
begin
http_client.close_connection(conn_info.name)
rescue Bunny::ConnectionForced
# This is not a problem, but the specs intermittently believe it is.
end
close_ignoring_permitted_exceptions(conn_info.name)
end
end

def close_ignoring_permitted_exceptions(connection_name)
http_client.close_connection(connection_name)
rescue Bunny::ConnectionForced
end

def wait_for_recovery
sleep 1.5
end
Expand Down

0 comments on commit cf08b1c

Please sign in to comment.