Sha256: 7f9212eb023d7d0c43dff49c702f9c04d5f217c7a883f315b03e3caa4bc753b8
Contents?: true
Size: 1007 Bytes
Versions: 52
Compression:
Stored size: 1007 Bytes
Contents
# encoding: utf-8 require "spec_helper" # this example group ensures no message size is special # (with respect to framing edge cases). MK. describe "Stress test with messages with incrementing sizes" do # # Environment # include EventedSpec::AMQPSpec default_options AMQP_OPTS default_timeout 60 amqp_before do @channel = AMQP::Channel.new @channel.on_error do |ch, close| raise "Channel-level error!: #{close.inspect}" end @queue = @channel.queue("", :auto_delete => true) @exchange = @channel.fanout("amqpgem.tests.integration.fanout.exchange", :auto_delete => true) @queue.bind(@exchange) end # # Examples # it "passes" do list = Range.new(0, 4785).to_a received = Array.new @queue.subscribe do |metadata, payload| received << payload.bytesize done if received == list end EventMachine.add_timer(1.0) do list.each do |n| @exchange.publish("i" * n) end end end end
Version data entries
52 entries across 52 versions & 1 rubygems