Sha256: 713f181ea59c93062176216d08e8f0c7f7d3baaf3ac209826180d24e132adfd2
Contents?: true
Size: 1.08 KB
Versions: 20
Compression:
Stored size: 1.08 KB
Contents
require "spec_helper" describe "Client-defined heartbeat interval" do context "with value > 0" do let(:connection) do c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => 4) c.start c end it "can be enabled explicitly" do sleep 5.0 connection.close end end # issue 267 context "with value = 0" do let(:connection) do c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => 0, :automatically_recover => false) c.start c end it "disables heartbeats" do sleep 1.0 connection.close end end end describe "Server-defined heartbeat interval" do let(:connection) do c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => :server) c.start c end it "can be enabled explicitly" do puts "Sleeping for 5 seconds with heartbeat interval of 4" sleep 5.0 connection.close end end
Version data entries
20 entries across 20 versions & 1 rubygems