X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=47b62a985f50cef28ca3cbb0b46ca7d1ae281ec9;hb=89c7c05de14174d58b2ddc1a48cdb2d41357449f;hp=a958331c004bf4add5a59b6f159d421e07e2167a;hpb=d931aae121a543895df014a8416f5b1f698c00f8;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index a958331..47b62a9 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -4,7 +4,7 @@ package # hide from PAUSE use strict; use warnings; -use DBICTest::Util qw( local_umask dbg DEBUG_TEST_CONCURRENCY_LOCKS ); +use DBICTest::Util qw( local_umask await_flock dbg DEBUG_TEST_CONCURRENCY_LOCKS ); use DBICTest::Schema; use DBICTest::Util::LeakTracer qw/populate_weakregistry assert_empty_weakregistry/; use DBIx::Class::_Util 'detected_reinvoked_destructor'; @@ -93,7 +93,7 @@ sub import { DEBUG_TEST_CONCURRENCY_LOCKS > 1 and dbg "Waiting for EXCLUSIVE global lock..."; - flock ($global_lock_fh, LOCK_EX) or die "Unable to lock $lockpath: $!"; + await_flock ($global_lock_fh, LOCK_EX) or die "Unable to lock $lockpath: $!"; DEBUG_TEST_CONCURRENCY_LOCKS > 1 and dbg "Got EXCLUSIVE global lock"; @@ -117,7 +117,7 @@ sub import { DEBUG_TEST_CONCURRENCY_LOCKS > 1 and dbg "Waiting for SHARED global lock..."; - flock ($global_lock_fh, LOCK_SH) or die "Unable to lock $lockpath: $!"; + await_flock ($global_lock_fh, LOCK_SH) or die "Unable to lock $lockpath: $!"; DEBUG_TEST_CONCURRENCY_LOCKS > 1 and dbg "Got SHARED global lock";