diff options
Diffstat (limited to 'test/test_client_expire.rb')
-rw-r--r-- | test/test_client_expire.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_client_expire.rb b/test/test_client_expire.rb index 0260850..9cc85c2 100644 --- a/test/test_client_expire.rb +++ b/test/test_client_expire.rb @@ -1,5 +1,6 @@ # Copyright (C) 2013-2015 all contributors <yahns-public@yhbt.net> # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +# frozen_string_literal: true require_relative 'server_helper' class TestClientExpire < Testcase @@ -53,7 +54,7 @@ class TestClientExpire < Testcase s = get_tcp_client(host, port) req = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n" s.write(req) - str = "" + str = ''.dup Timeout.timeout(20) { str << s.readpartial(666) until str =~ /\r\n\r\n/ } assert_match(%r{keep-alive}, str) sleep 2 @@ -113,7 +114,7 @@ class TestClientExpire < Testcase s = get_tcp_client(host, port) req = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n" s.write(req) - str = "" + str = ''.dup Timeout.timeout(20) { str << s.readpartial(666) until str =~ /\r\n\r\n/ } assert_match(%r{keep-alive}, str) sleep 1 |