Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better log file reopening tests
  • Loading branch information
kraih committed Apr 1, 2012
1 parent a02e16c commit aeddb36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -440,7 +440,7 @@ Decrease worker pool by one.
=item C<USR1>
Reopen log file.
Reopen log file server-wide.
=item C<USR2>
Expand Down Expand Up @@ -477,7 +477,7 @@ Stop worker gracefully.
=item C<USR1>
Reopen log file.
Reopen worker log file.
=back
Expand Down
4 changes: 3 additions & 1 deletion t/mojo/log.t
@@ -1,6 +1,6 @@
use Mojo::Base -strict;

use Test::More tests => 48;
use Test::More tests => 50;

# "Don't let Krusty's death get you down, boy.
# People die all the time, just like that.
Expand All @@ -26,7 +26,9 @@ like(
$path = catdir $dir, 'test2.log';
$log = Mojo::Log->new->level('debug')->path($path);
ok $log->handle, 'handle has been opened';
ok !$log->handle(undef)->handle, 'handle has been replaced';
ok $log->reopen, 'handle has been reopened';
ok $log->handle, 'handle is open';
$log->info('Works again.');
undef $log;
like(
Expand Down

0 comments on commit aeddb36

Please sign in to comment.