From 579f0ea63d1f6976a9a312423f45e8d38357ea68 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Jun 2011 23:31:28 -0700 Subject: test_linux_tcp_info: fix test for higher HZ systems The last_data_recv field is dependent on the CONFIG_HZ of the kernel, so the stock 250 HZ kernel can change the timing on us. --- test/test_linux_tcp_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_linux_tcp_info.rb b/test/test_linux_tcp_info.rb index 1751dee..f429d1d 100644 --- a/test/test_linux_tcp_info.rb +++ b/test/test_linux_tcp_info.rb @@ -49,7 +49,7 @@ class TestLinuxTCP_Info < Test::Unit::TestCase s = TCPServer.new(TEST_ADDR, 0) c = TCPSocket.new TEST_ADDR, s.addr[1] c.syswrite "." - sleep delay + sleep(delay * 1.2) a = s.accept i = Raindrops::TCP_Info.new(a) assert i.last_data_recv >= delay_ms, "#{i.last_data_recv} < #{delay_ms}" -- cgit v1.2.3-24-ge0c7