Skip to content

Commit

Permalink
Add sleep to wait for connection to be closed?
Browse files Browse the repository at this point in the history
  • Loading branch information
spuun committed Aug 23, 2024
1 parent 3199832 commit e163d5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/amqp-client_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ describe AMQP::Client do
with_http_api do |api|
api.close_connections(1)
end
sleep 1 # Wait for connection to be closed
expect_raises(AMQP::Client::Connection::ClosedException) do
ch.basic_publish "", "", "foobar"
end
Expand All @@ -443,6 +444,7 @@ describe AMQP::Client do
with_http_api do |api|
api.close_connections(1)
end
sleep 1 # Wait for connection to be closed
expect_raises(AMQP::Client::Connection::ClosedException) do
ch.basic_publish_confirm "", "", "foobar"
end
Expand Down

0 comments on commit e163d5d

Please sign in to comment.