diff options
author | Hleb Valoshka <375gnu@gmail.com> | 2013-09-09 22:03:58 +0300 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-11-14 03:03:51 +0000 |
commit | ba6604f00a6fad2c8bf32808928942c37b1617af (patch) | |
tree | 8f9b22667de577c9a535c46be91aeeeed3e9d573 | |
parent | 73a601986e52729c7aa17b6fb2245ca7b9ef7152 (diff) | |
download | raindrops-ba6604f00a6fad2c8bf32808928942c37b1617af.tar.gz |
Signed-off-by: Eric Wong <normalperson@yhbt.net>
-rw-r--r-- | test/test_linux_ipv6.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_linux_ipv6.rb b/test/test_linux_ipv6.rb index ec08f28..9e8730a 100644 --- a/test/test_linux_ipv6.rb +++ b/test/test_linux_ipv6.rb @@ -12,6 +12,14 @@ class TestLinuxIPv6 < Test::Unit::TestCase TEST_ADDR = ENV["TEST_HOST6"] || "::1" + def setup + @to_close = [] + end + + def teardown + @to_close.each { |io| io.close unless io.closed? } + end + def test_tcp s = TCPServer.new(TEST_ADDR, 0) port = s.addr[1] |