test/integration/udp_proxy_test.rb in propono-0.6.1 vs test/integration/udp_proxy_test.rb in propono-0.6.3
- old
+ new
@@ -3,11 +3,14 @@
module Propono
class UdpProxyTest < IntegrationTest
def test_the_message_gets_there
topic = "test-topic"
message = "This is my message"
+ Propono.config.udp_port = 20001
+ Propono.subscribe_by_queue(topic)
+
udp_thread = Thread.new do
Propono.proxy_udp
end
sqs_thread = Thread.new do
@@ -16,10 +19,10 @@
sqs_thread.terminate
end
end
Propono.publish(topic, message, protocol: :udp)
- flunk unless wait_for_thread(sqs_thread)
+ flunk("Test timeout") unless wait_for_thread(sqs_thread)
ensure
udp_thread.terminate
sqs_thread.terminate
end
end