Commit 77c136da authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

change timers to avoid false results

parent e0e3989f
...@@ -90,7 +90,7 @@ class TestComunicationProperties < Test::Unit::TestCase ...@@ -90,7 +90,7 @@ class TestComunicationProperties < Test::Unit::TestCase
end end
#message will be certainly expired at 15 seconds, (min_message_buffer_timeout / 3) + 1 #message will be certainly expired at 15 seconds, (min_message_buffer_timeout / 3) + 1
EM.add_timer(15) do EM.add_timer(16) do
sub_3 = EventMachine::HttpRequest.new(nginx_address + '/sub/' + channel.to_s + '.b1').get :head => headers, :timeout => 60 sub_3 = EventMachine::HttpRequest.new(nginx_address + '/sub/' + channel.to_s + '.b1').get :head => headers, :timeout => 60
sub_3.stream { |chunk| sub_3.stream { |chunk|
response_3 += chunk response_3 += chunk
...@@ -99,7 +99,7 @@ class TestComunicationProperties < Test::Unit::TestCase ...@@ -99,7 +99,7 @@ class TestComunicationProperties < Test::Unit::TestCase
fail_if_connecttion_error(sub_3) fail_if_connecttion_error(sub_3)
end end
EM.add_timer(16) do EM.add_timer(17) do
assert_equal("#{@header_template}\r\n#{body}\r\n", response_1, "Didn't received header and message") assert_equal("#{@header_template}\r\n#{body}\r\n", response_1, "Didn't received header and message")
assert_equal("#{@header_template}\r\n#{body}\r\n", response_2, "Didn't received header and message") assert_equal("#{@header_template}\r\n#{body}\r\n", response_2, "Didn't received header and message")
assert_equal("#{@header_template}\r\n", response_3, "Didn't received header") assert_equal("#{@header_template}\r\n", response_3, "Didn't received header")
......
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