unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] test_signals: increase delay between Process.kill
@ 2013-05-04  3:04 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2013-05-04  3:04 UTC (permalink / raw)
  To: mongrel-unicorn

Otherwise, the signalled process may take too long to react to
and process all the signals on machines with few CPUs.
---
 I seem to need this on my dual-core laptop running CONFIG_HZ=100
 for the test to run reliably

 pushed to master of git://bogomips.org/unicorn

 test/unit/test_signals.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unit/test_signals.rb b/test/unit/test_signals.rb
index 84d6a4b..f1d8bb3 100644
--- a/test/unit/test_signals.rb
+++ b/test/unit/test_signals.rb
@@ -174,7 +174,7 @@ def test_request_read
     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)
-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-04  3:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-04  3:04 [PATCH] test_signals: increase delay between Process.kill Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).