summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 05:38:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-26 05:38:12 +0000
commit3041f72833e9c5a77914bb096df15e6132e73170 (patch)
tree03fa87bac7c91baccb43c0fb1ae9b18e990dc28c /test/net
parent6fb6491c297a733fdc96960670e3d6cf795ead4b (diff)
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
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_http.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 6c847db..9def957 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