Skip to content

Commit

Permalink
Extract Method to replace Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
camelpunch committed Jun 12, 2016
1 parent 38d1304 commit 0e52284
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 0e52284

Please sign in to comment.