changelog for last patch
[gitmo/MooseX-Daemonize.git] / t / 01.filecreate.t
index d961841..4319d0d 100644 (file)
@@ -40,11 +40,12 @@ $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt');
         my ( $self, $file ) = @_;
         open( my $FILE, ">$file" ) || die $!;
         close($FILE);
+        sleep 1 while 1;
     }
 }
 
 my $app = FileMaker->new(
-    pidbase  => $dir,
+    pidbase  => "$dir/subdir",
     filename => $FILENAME,
 );
 isa_ok($app, 'FileMaker');
@@ -54,7 +55,7 @@ does_ok($app, 'MooseX::Daemonize::Core');
 
 isa_ok($app->pidfile, 'MooseX::Daemonize::Pid::File');
 
-is($app->pidfile->file, catfile($dir, "filemaker.pid"), '... got the right PID file path');
+is($app->pidfile->file, catfile("$dir/subdir", "filemaker.pid"), '... got the right PID file path');
 ok(not(-e $app->pidfile->file), '... our pidfile does not exist');
 
 ok(!$app->status, '... the daemon is running');