Sha256: 4f6d59d68def594dc99b2dff99bb05f39570acd88b8e176531c2df39dec0e4b4
Contents?: true
Size: 1.28 KB
Versions: 17
Compression:
Stored size: 1.28 KB
Contents
require "spec_helper" unless defined?(JRUBY_VERSION) && !ENV["FORCE_JRUBY_RUN"] describe Bunny::Session do # creating thousands of connections means creating # twice as many threads and this won't fly with the JVM # in CI containers. MK. n = if defined?(JRUBY_VERSION) 250 else 2500 end n.times do |i| it "can be closed (automatic recovery disabled, take #{i})" do c = Bunny.new(:automatically_recover => false) c.start ch = c.create_channel expect(c).to be_connected c.stop expect(c).to be_closed end end n.times do |i| it "can be closed (automatic recovery enabled, take #{i})" do c = Bunny.new(:automatically_recover => true) c.start ch = c.create_channel expect(c).to be_connected c.stop expect(c).to be_closed end end context "in the single threaded mode" do n.times do |i| it "can be closed (single threaded mode, take #{i})" do c = Bunny.new(:automatically_recover => false, :threaded => false) c.start ch = c.create_channel expect(c).to be_connected c.stop expect(c).to be_closed end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems