about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-21 13:14:33 -0700
committerEric Wong <normalperson@yhbt.net>2009-03-21 13:38:25 -0700
commit46681f6ffd71b0902801f728f8911b02f3f09e1e (patch)
tree8917605a5f4c55fff56b516a060b31c2aaab852a /test
parent90e68ef4d28615887e3a102e2233ceb46509f272 (diff)
downloadunicorn-46681f6ffd71b0902801f728f8911b02f3f09e1e.tar.gz
The master _may_ run with different user/group/umask than the
workers.  Since the logs were always created by the master
process, the master should rotate them first to ensure correct
ownership and permissions.

This way if the workers fail log rotation and die, they'll
be automatically respawned with the new logs in place.
Diffstat (limited to 'test')
-rw-r--r--test/exec/test_exec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index fc8ac26..ea9fc7c 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -300,7 +300,7 @@ end
       sleep DEFAULT_RES
       log = File.readlines(rotate.path)
     end
-    assert_equal 4, log.grep(/rotating logs\.\.\./).size
+    assert_equal 4, log.grep(/worker=\d+ rotating logs\.\.\./).size
     assert_equal 0, log.grep(/done rotating logs/).size
 
     tries = DEFAULT_TRIES
@@ -309,7 +309,7 @@ end
       sleep DEFAULT_RES
       log = File.readlines(COMMON_TMP.path)
     end
-    assert_equal 4, log.grep(/done rotating logs/).size
+    assert_equal 4, log.grep(/worker=\d+ done rotating logs/).size
     assert_equal 0, log.grep(/rotating logs\.\.\./).size
     assert_nothing_raised { Process.kill('QUIT', pid) }
     status = nil