Sha256: 2578fa0f578514cf81f45e4ed942ed5f19519e194f4bf41dd114fb2ab6292533

Contents?: true

Size: 663 Bytes

Versions: 30

Compression:

Stored size: 663 Bytes

Contents

require "spec_helper"

unless ENV["CI"]
  describe "Rapidly opening and closing lots of channels on a non-threaded connection" do
    before :all do
      @connection = Bunny.new(username: "bunny_gem", password: "bunny_password", vhost: "bunny_testbed",
        automatic_recovery: false, threaded: false)
      @connection.start
    end

    after :all do
      @connection.close
    end

    context "in a single-threaded scenario" do
      let(:n) { 500 }

      it "works correctly" do
        xs = Array.new(n) { @connection.create_channel }

        expect(xs.size).to eq n
        xs.each do |ch|
          ch.close
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
bunny-2.8.1 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.9.0 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.7.3 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.8.0 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.7.2 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.7.1 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.7.0 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.6.6 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.6.5 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb
bunny-2.6.4 spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb