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=399b94557c905a4786209415b33c5a622181701f;hp=27629a71a1cbcd1682901553a231d61b5a6df889;hpb=c0329273268971824784f239f32c7246e68da9c5;p=dbsrgits%2FDBIx-Class.git diff --git a/xt/dist/loadable_standalone_testschema_resultclasses.t b/xt/dist/loadable_standalone_testschema_resultclasses.t index 27629a7..95dd24f 100644 --- a/xt/dist/loadable_standalone_testschema_resultclasses.t +++ b/xt/dist/loadable_standalone_testschema_resultclasses.t @@ -11,12 +11,11 @@ use if DBIx::Class::_ENV_::BROKEN_FORK, 'threads'; use Test::More; use File::Find; -use Time::HiRes 'sleep'; 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 :(' ); }