Better concurrency in test (parent blocks)
[dbsrgits/DBIx-Class.git] / 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;
           }