test_signals: increase delay between Process.kill
authorEric Wong <normalperson@yhbt.net>
Fri, 3 May 2013 22:08:15 +0000 (3 22:08 +0000)
committerEric Wong <normalperson@yhbt.net>
Sat, 4 May 2013 00:39:48 +0000 (4 00:39 +0000)
Otherwise, the signalled process may take too long to react to
and process all the signals on machines with few CPUs.

test/unit/test_signals.rb

index 84d6a4b..f1d8bb3 100644 (file)
@@ -174,7 +174,7 @@ class SignalsTest < Test::Unit::TestCase
     sock.syswrite("Content-Length: #{@bs * @count}\r\n\r\n")
     1000.times { Process.kill(:HUP, pid) }
     size_before = @tmp.stat.size
-    killer = fork { loop { Process.kill(:HUP, pid); sleep(0.0001) } }
+    killer = fork { loop { Process.kill(:HUP, pid); sleep(0.01) } }
     buf = ' ' * @bs
     @count.times { sock.syswrite(buf) }
     Process.kill(:KILL, killer)