X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Fstorage%2Ftxn.t;h=c4ecefd7fc32de9b777a5c171741888dff161486;hp=895eaaa8ba91dd3854c0b5cc0190afaeb9134b2a;hb=02050e77ae9d754e33ca2d5391f5a6bbbe3e43b1;hpb=cc1924acbaee79d5ee250854e3439fab90aca75d diff --git a/t/storage/txn.t b/t/storage/txn.t index 895eaaa..c4ecefd 100644 --- a/t/storage/txn.t +++ b/t/storage/txn.t @@ -233,6 +233,12 @@ sub _test_forking_action { for my $pid (@pids) { waitpid ($pid, 0); ok (! $?, "Child $pid exit ok (pass $pass)"); + } + + # it is important to reap all children before checking the final db-state + # otherwise a deadlock may occur between the transactions running in the + # children and the query of the parent + for my $pid (@pids) { isa_ok ($schema->resultset ('Artist')->find ({ name => "forking action $pid" }), 'DBIx::Class::Row'); } }