Better concurrency in test (parent blocks)
Peter Rabbitson [Tue, 27 Apr 2010 14:53:06 +0000 (14:53 +0000)]
t/storage/factory_fork.t

index 30e1c6f..ea6fd6e 100644 (file)
@@ -34,9 +34,12 @@ for my $type (qw/PG MYSQL/) {
           skip "Fork failed: $!", 1 if (! defined $pid);
 
           if ($pid) {
-            sleep 1;
+            note "Parent $$ sleeping...";
+            wait();
+            note "Parent $$ woken up after child $pid exit";
           }
           else {
+            note "Child $$ terminating";
             exit 0;
           }