Sha256: 5da46795c3b928a3f7504b684401ac8871dea48226f0ce0f29447636c86575d6

Contents?: true

Size: 696 Bytes

Versions: 72

Compression:

Stored size: 696 Bytes

Contents

require "spec_helper"

describe "Client-defined heartbeat interval" 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


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

72 entries across 72 versions & 1 rubygems

Version Path
bunny-1.6.2 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.6.1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.6.0 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.5.1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.6.0.rc2 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.6.0.rc1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.6.0.pre1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.5.0 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.5.0.pre2 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.5.0.pre1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.4.1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.4.0 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.3.1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.3.0 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.2.2 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.2.1 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.2.0 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.1.9 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.1.8 spec/higher_level_api/integration/heartbeat_spec.rb
bunny-1.1.7 spec/higher_level_api/integration/heartbeat_spec.rb