diff --git a/test/plugin_helper/test_http_server_helper.rb b/test/plugin_helper/test_http_server_helper.rb index 905526c207..a3f89cde4d 100644 --- a/test/plugin_helper/test_http_server_helper.rb +++ b/test/plugin_helper/test_http_server_helper.rb @@ -132,7 +132,7 @@ def start_https_request(addr, port, verify: true, cert_path: nil, selfsigned: tr resp = nil error = nil - Async do + Sync do Console.logger = Fluent::Log::ConsoleAdapter.wrap(NULL_LOGGER) begin response = yield(client) @@ -141,7 +141,8 @@ def start_https_request(addr, port, verify: true, cert_path: nil, selfsigned: tr end if response - resp = Response.new(response.status.to_s, response.body.read, response.headers) + resp = Response.new(response.status.to_s, response.read, response.headers) + response.close end end