Sha256: 0bcbd567c282c339d2295d0a2478c7b30eb0bcfe7a85f957db6b22c6e136b082
Contents?: true
Size: 830 Bytes
Versions: 46
Compression:
Stored size: 830 Bytes
Contents
class IntegrationTestSetup def threads @threads ||= {} end def queues @queues ||= [] end def make_queue_and_setup_receiver(klass,queue_name,routing_key) queue = channel.queue(queue_name, durable: true, arguments: {}) queue.bind(topic_exchange, routing_key: routing_key) queues << queue threads[klass] = Thread.new do Pwwka::Receiver.subscribe(klass, queue_name, routing_key: routing_key) end end def kill_threads_and_clear_queues threads.each do |_,thread| Thread.kill(thread) end queues.each do |queue| queue.purge queue.delete end end def channel_connector @channel_connector ||= Pwwka::ChannelConnector.new end def channel channel_connector.channel end def topic_exchange channel_connector.topic_exchange end end
Version data entries
46 entries across 46 versions & 1 rubygems