require "spec_helper"

unless RUBY_ENGINE == "jruby"
  describe Bunny::Session do
    4000.times do |i|
      it "can be closed (take #{i})" do
        c  = Bunny.new(:automatically_recover => false)
        c.start
        ch = c.create_channel

        c.should be_connected
        c.stop
        c.should be_closed
      end
    end
  end
end

Move this to stress tests
Move this to stress tests

Excluded on JRuby because aggressive thread creation and shutdown
in a loop is really slow.
