Commit 566fe038 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

adding timeout to some tests

parent 7e70cc1c
...@@ -130,6 +130,7 @@ class TestComunicationProperties < Test::Unit::TestCase ...@@ -130,6 +130,7 @@ class TestComunicationProperties < Test::Unit::TestCase
EventMachine.stop EventMachine.stop
end end
} }
add_test_timeout(20)
} }
end end
...@@ -163,6 +164,7 @@ class TestComunicationProperties < Test::Unit::TestCase ...@@ -163,6 +164,7 @@ class TestComunicationProperties < Test::Unit::TestCase
EventMachine.stop EventMachine.stop
end end
} }
add_test_timeout(20)
} }
end end
end end
...@@ -274,6 +274,8 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -274,6 +274,8 @@ class TestSubscriber < Test::Unit::TestCase
assert_equal(200, sub_1.response_header.status, "Channel was founded") assert_equal(200, sub_1.response_header.status, "Channel was founded")
EventMachine.stop EventMachine.stop
} }
add_test_timeout
} }
end end
...@@ -300,6 +302,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -300,6 +302,7 @@ class TestSubscriber < Test::Unit::TestCase
assert_equal(200, sub_1.response_header.status, "Channel was founded") assert_equal(200, sub_1.response_header.status, "Channel was founded")
EventMachine.stop EventMachine.stop
} }
add_test_timeout
} }
end end
...@@ -417,6 +420,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -417,6 +420,7 @@ class TestSubscriber < Test::Unit::TestCase
EventMachine.stop EventMachine.stop
end end
} }
add_test_timeout(10)
} }
end end
...@@ -484,6 +488,8 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -484,6 +488,8 @@ class TestSubscriber < Test::Unit::TestCase
publish_message_inline(channel_4, headers, body + channel_4.to_s) publish_message_inline(channel_4, headers, body + channel_4.to_s)
publish_message_inline(channel_5, headers, body + channel_5.to_s) publish_message_inline(channel_5, headers, body + channel_5.to_s)
publish_message_inline(channel_6, headers, body + channel_6.to_s) publish_message_inline(channel_6, headers, body + channel_6.to_s)
add_test_timeout(10)
} }
end end
...@@ -654,6 +660,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -654,6 +660,7 @@ class TestSubscriber < Test::Unit::TestCase
EventMachine.stop EventMachine.stop
} }
} }
add_test_timeout(10)
} }
end end
...@@ -730,6 +737,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -730,6 +737,7 @@ class TestSubscriber < Test::Unit::TestCase
#publish a message #publish a message
publish_message_inline(channel, headers, body) publish_message_inline(channel, headers, body)
add_test_timeout
} }
EventMachine.run { EventMachine.run {
...@@ -741,6 +749,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -741,6 +749,7 @@ class TestSubscriber < Test::Unit::TestCase
assert_equal(body, response['text'], "Wrong message") assert_equal(body, response['text'], "Wrong message")
EventMachine.stop EventMachine.stop
} }
add_test_timeout
} }
EventMachine.run { EventMachine.run {
...@@ -752,6 +761,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -752,6 +761,7 @@ class TestSubscriber < Test::Unit::TestCase
assert_equal(body, response['msg'], "Wrong message") assert_equal(body, response['msg'], "Wrong message")
EventMachine.stop EventMachine.stop
} }
add_test_timeout
} }
end end
...@@ -774,6 +784,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -774,6 +784,7 @@ class TestSubscriber < Test::Unit::TestCase
#publish a message #publish a message
publish_message_inline(channel, headers, body) publish_message_inline(channel, headers, body)
add_test_timeout
} }
end end
...@@ -808,6 +819,7 @@ class TestSubscriber < Test::Unit::TestCase ...@@ -808,6 +819,7 @@ class TestSubscriber < Test::Unit::TestCase
assert_equal("chunked", sub_1.response_header['TRANSFER_ENCODING'], "Didn't receive the right transfer encoding") assert_equal("chunked", sub_1.response_header['TRANSFER_ENCODING'], "Didn't receive the right transfer encoding")
EventMachine.stop EventMachine.stop
} }
add_test_timeout
} }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment