Sha256: 3575ec476d73069eae34cc607897a81f3f4d302f5acc6e7cb72b508cc475cada

Contents?: true

Size: 885 Bytes

Versions: 35

Compression:

Stored size: 885 Bytes

Contents

require 'spec_helper'
require 'integration/eventmachine/spec_helper'

describe AMQ::Client::EventMachineClient, "Channel#flow" do
  include EventedSpec::SpecHelper
  default_timeout 1

  it "controls channel flow state" do
    em_amqp_connect do |client|
      flow_states = []

      channel = AMQ::Client::Channel.new(client, 1)
      channel.open do
        channel.flow_is_active?.should be_true

        channel.flow(false) do |flow_status1|
          channel.flow_is_active?.should be_false
          flow_states << channel.flow_is_active?

          channel.flow(true) do |flow_status2|
            channel.flow_is_active?.should be_true
            flow_states << channel.flow_is_active?
          end # channel.flow
        end # channel.flow
      end # channel.open

      done(0.5) { flow_states.should == [false, true] }
    end # em_amqp_connect
  end # it
end # describe

Version data entries

35 entries across 35 versions & 1 rubygems

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