Skip to content

Commit

Permalink
Prepare for #706
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Feb 22, 2025
1 parent eaa00f5 commit 63e4a1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ group :development do
end

group :test do
gem "rspec", "~> 3.12.0"
gem "rspec", "~> 3.13.0"
gem "base64"
gem "rabbitmq_http_api_client", "~> 2.2.0", require: "rabbitmq/http/client"
gem "toxiproxy", "~> 2"
end
Expand Down
1 change: 0 additions & 1 deletion bunny.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env gem build
# encoding: utf-8

require "base64"
require File.expand_path("../lib/bunny/version", __FILE__)

Gem::Specification.new do |s|
Expand Down
3 changes: 3 additions & 0 deletions spec/higher_level_api/integration/connection_recovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let(:http_client) { RabbitMQ::HTTP::Client.new("http://127.0.0.1:15672") }
let(:logger) { Logger.new($stderr).tap {|logger| logger.level = ENV["BUNNY_LOG_LEVEL"] || Logger::WARN } }
let(:recovery_interval) { 0.2 }
let(:connection_interval) { 2 }

it "reconnects after grace period" do
with_open do |c|
Expand Down Expand Up @@ -421,6 +422,7 @@ def with_open(c = Bunny.new(network_recovery_interval: recovery_interval,

def with_open_multi_host(&block)
c = Bunny.new(hosts: ["127.0.0.1", "localhost"],
connection_interval: connection_interval,
network_recovery_interval: recovery_interval,
recover_from_connection_close: true,
logger: logger)
Expand All @@ -431,6 +433,7 @@ def with_open_multi_broken_host(&block)
c = Bunny.new(hosts: ["broken", "127.0.0.1", "localhost"],
hosts_shuffle_strategy: Proc.new { |hosts| hosts }, # We do not shuffle for these tests so we always hit the broken host
network_recovery_interval: recovery_interval,
connection_interval: connection_interval,
recover_from_connection_close: true,
logger: logger)
with_open(c, &block)
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

require "bunny"
require "bunny/test_kit"
require "base64"

puts "Using Ruby #{RUBY_VERSION}, amq-protocol #{AMQ::Protocol::VERSION}"

Expand Down

0 comments on commit 63e4a1a

Please sign in to comment.