Sha256: cefa4d6d515ff51b3b1080ec1d0e0e8fb4b51ef716e3e6998f030c789e095dcb

Contents?: true

Size: 904 Bytes

Versions: 32

Compression:

Stored size: 904 Bytes

Contents

# encoding: utf-8

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

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

  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(1.0) { flow_states.should == [false, true] }
    end # em_amqp_connect
  end # it
end # describe

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
amq-client-0.9.0 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.9.0.pre2 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.9.0.pre1 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.7 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.7.pre1 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.6 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.5 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.4 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.3 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.2 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.1 spec/integration/eventmachine/channel_flow_spec.rb
amq-client-0.8.0 spec/integration/eventmachine/channel_flow_spec.rb