Sha256: f62b47146a075fc614e0438312390d7607abc1bda3ee07034ba6d798430ea8ca

Contents?: true

Size: 1.13 KB

Versions: 32

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'
require 'integration/coolio/spec_helper'

describe "AMQ::Client::CoolioClient", "Channel.Flow", :nojruby => true do
  include EventedSpec::SpecHelper
  default_timeout 1

  it "should control the flow of channel" do
    coolio_amqp_connect do |client|
      channel = AMQ::Client::Channel.new(client, 1)
      channel.open do
        channel.flow_is_active?.should be_true
        channel.flow(false) do |_, flow_active|
          flow_active.should be_false
          channel.flow(true) do |_, flow_active|
            flow_active.should be_true
          end
        end
        done
      end
    end
  end


  it "should not raise errors when no state change occurs" do
    coolio_amqp_connect do |client|
      channel = AMQ::Client::Channel.new(client, 1)
      expect {
        channel.open do
          channel.flow_is_active?.should be_true
          channel.flow(false) do |_, flow_active|
            flow_active.should be_false
            channel.flow(false) do |_, flow_active|
              flow_active.should be_false
            end
          end
          done
        end
      }.to_not raise_error
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
amq-client-0.7.0.alpha35 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha34 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha33 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha32 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha31 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha30 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha29 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha28 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha27 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha26 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha25 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha24 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha23 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha22 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha21 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha20 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha19 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha18 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha17 spec/integration/coolio/channel_flow_spec.rb
amq-client-0.7.0.alpha16 spec/integration/coolio/channel_flow_spec.rb