1 # -*- encoding: binary -*-
6 $stderr.sync = $stdout.sync = true
8 class TestLinuxAllTcpListenStatsLeak < Test::Unit::TestCase
10 TEST_ADDR = ENV['UNICORN_TEST_ADDR'] || '127.0.0.1'
14 File.readlines("/proc/#$$/status").grep(/VmRSS:/)[0].split(/\s+/)[1].to_i
17 s = TCPServer.new(TEST_ADDR, 0)
19 p [ :start_kb, start_kb ]
20 assert_nothing_raised do
22 1000.times { Raindrops::Linux.all_tcp_listener_stats }
29 assert_nothing_raised do
30 1000000000.times { |i|
35 Raindrops::Linux.all_tcp_listener_stats
43 end if ENV["STRESS"].to_i != 0