From: Eric Wong <normalperson@yhbt.net>
To: mongrel-unicorn@rubyforge.org
Subject: [PATCH] test_signals: increase delay between Process.kill
Date: Sat, 4 May 2013 03:04:46 +0000 [thread overview]
Message-ID: <20130504030446.GA2450@dcvr.yhbt.net> (raw)
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
reply other threads:[~2013-05-04 3:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130504030446.GA2450@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).