about summary refs log tree commit homepage
path: root/test/test_server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_server.rb')
-rw-r--r--test/test_server.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test_server.rb b/test/test_server.rb
index 649c826..825afd9 100644
--- a/test/test_server.rb
+++ b/test/test_server.rb
@@ -51,8 +51,11 @@ class TestServer < Testcase
       end
     end
     Process.kill(:QUIT, pid)
-    "GET / HTTP/1.1\r\n\r\n".each_byte { |x| Thread.pass; c.write(x.chr) }
-    buf = Timeout.timeout(10) { c.read }
+    "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".each_byte do |x|
+      sleep(0.01)
+      c.write(x.chr)
+    end
+    buf = Timeout.timeout(30) { c.read }
     assert_match(/Connection: close/, buf)
     _, status = Timeout.timeout(10) { Process.waitpid2(pid) }
     assert status.success?, status.inspect