X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Fdist%2Floadable_standalone_testschema_resultclasses.t;h=95dd24f4ffe694edf1b6eca12220d9784caa1eb2;hb=296248c321e75da7fd912ed80b8644aa3cdcccd6;hp=f0dd2acb44d942182fdce66c306081af8018917c;hpb=da9346a03a7df80d02f40584422af71fbd2ca4f8;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/xt/dist/loadable_standalone_testschema_resultclasses.t b/xt/dist/loadable_standalone_testschema_resultclasses.t index f0dd2ac..95dd24f 100644 --- a/xt/dist/loadable_standalone_testschema_resultclasses.t +++ b/xt/dist/loadable_standalone_testschema_resultclasses.t @@ -1,22 +1,21 @@ +BEGIN { + delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY}; + do "./t/lib/ANFANG.pm" or die ( $@ || $! ) +} + use warnings; use strict; -BEGIN { delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY} } - use DBIx::Class::_Util 'sigwarn_silencer'; use if DBIx::Class::_ENV_::BROKEN_FORK, 'threads'; use Test::More; use File::Find; -use Time::HiRes 'sleep'; - - -use lib 't/lib'; my $worker = sub { my $fn = shift; - if (my @offenders = grep { $_ !~ m{DBIx/Class/(?:_Util|Carp)\.pm} } grep { $_ =~ /(^|\/)DBI/ } keys %INC) { + if (my @offenders = grep { $_ !~ m{DBIx/Class/(?:_Util|Carp|StartupCheck)\.pm} } grep { $_ =~ /(^|\/)DBI/ } keys %INC) { die "Wtf - DBI* modules present in %INC: @offenders"; } @@ -35,7 +34,7 @@ find({ if (DBIx::Class::_ENV_::BROKEN_FORK) { # older perls crash if threads are spawned way too quickly, sleep for 100 msecs my $t = threads->create(sub { $worker->($_) }); - sleep 0.1; + select( undef, undef, undef, 0.1); is ($t->join, 42, "Thread loading $_ did not finish successfully") || diag ($t->can('error') ? $t->error : 'threads.pm too old to retrieve the error :(' ); }