Sha256: 07fc21e2be903de648bcde80be4dd28eb5850984342cbcca906967d69c060982

Contents?: true

Size: 617 Bytes

Versions: 4

Compression:

Stored size: 617 Bytes

Contents

Given /^a consumer is listening to queue '(.*)'$/ do |queue|
  klass = eval_consumer_class(queue)
  @thread = Thread.new do
    cons = klass.new
    case @adapter_type
    when /evented/
      EM.run do
        RosettaQueue::Consumer.new(cons).receive
      end
    else
      RosettaQueue::Consumer.new(cons).receive
    end
  end
end

Then /^the message should be consumed from '(.*)'$/ do |queue|
  sleep 1
  file_path = "#{CONSUMER_LOG_DIR}/point-to-point.log"
#  sleep 1 unless File.exists?(file_path)
  File.readlines(file_path).last.should =~ /Hello World! from #{queue.capitalize}Consumer/
  @thread.kill
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
bmabey-rosetta_queue-0.3.3 features/step_definitions/point_to_point_steps.rb
rosetta_queue-0.5.2 features/step_definitions/point_to_point_steps.rb
rosetta_queue-0.5.0 features/step_definitions/point_to_point_steps.rb
rosetta_queue-0.4.0 features/step_definitions/point_to_point_steps.rb