features/steps/frame_transmission_steps.rb in stomper-2.0.0 vs features/steps/frame_transmission_steps.rb in stomper-2.0.1
- old
+ new
@@ -30,6 +30,11 @@
end
When /^the frame exchange is completed without client disconnect$/ do
@connection.stop
@broker.stop
-end
\ No newline at end of file
+end
+
+When /^the client waits for (\d+) "([^"]*)" frames?$/ do |count, command|
+ count = count.to_i
+ Thread.pass while @received_frames.select { |f| f.command == command }.size < count
+end