reinstate the original (and dangerous) autopush in C
[kgio.git] / test / test_connect_fd_leak.rb
blob1dfc4cd4b01f20816ad0be81718b14cf95c3c5a7
1 require 'test/unit'
2 require 'io/nonblock'
3 $-w = true
4 require 'kgio'
6 class TestConnectFDLeak < Test::Unit::TestCase
8   def test_unix_socket
9     nr = 0
10     path = "/non/existent/path"
11     assert(! File.exist?(path), "#{path} should not exist")
12     begin
13       sock = Kgio::UNIXSocket.new(path)
14     rescue Errno::ENOENT
15     end while (nr += 1) < 10000
16   end
17 end