Revision history for DBIx::Class
-
+ - fixed storage->connected fork bug
+ (test and fix from Radu Greab)
- refactor Statistics to create debugging filehandle to fix bug with
closed STDERR, update docs and modify Versioned to use Statistics
(original fix from diz)
$num_children = 10;
}
-plan tests => $num_children + 5;
+plan tests => $num_children + 6;
use lib qw(t/lib);
};
ok(!$@) or diag "Creation eval failed: $@";
+{
+ my $pid = fork;
+ if(!defined $pid) {
+ die "fork failed: $!";
+ }
+
+ if (!$pid) {
+ exit $schema->storage->connected ? 1 : 0;
+ }
+
+ if (waitpid($pid, 0) == $pid) {
+ my $ex = $? >> 8;
+ ok($ex == 0, "storage->connected() returns false in child");
+ exit $ex if $ex; # skip remaining tests
+ }
+}
+
my @pids;
while(@pids < $num_children) {