From 3041f72833e9c5a77914bb096df15e6132e73170 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 May 2014 05:38:12 +0000 Subject: test_http.rb: fix leaked threads * test/net/http/test_http.rb (test_timeout_during_HTTP_session): join work threads not to leak threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/http/test_http.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/net/http/test_http.rb') diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 6c847dba7e..9def957b48 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -397,6 +397,7 @@ module TestNetHTTP_version_1_1_methods def test_timeout_during_HTTP_session bug4246 = "expected the HTTP session to have timed out but have not. c.f. [ruby-core:34203]" + th = nil # listen for connections... but deliberately do not read TCPServer.open('localhost', 0) {|server| port = server.addr[1] @@ -412,6 +413,9 @@ module TestNetHTTP_version_1_1_methods end assert th.join(10), bug4246 } + ensure + th.kill + th.join end end -- cgit v1.2.3