From: Peter Rabbitson Date: Thu, 29 Aug 2013 01:40:52 +0000 (+0200) Subject: Prevent DBD::Firebird and DBD::InterBase from colliding on same DSN X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6642a36f35c3292da6aa651370e7e4d8e75a1c4a;p=dbsrgits%2FDBIx-Class-Historic.git Prevent DBD::Firebird and DBD::InterBase from colliding on same DSN --- diff --git a/t/lib/DBICTest/Schema.pm b/t/lib/DBICTest/Schema.pm index 9ae6632..61a4386 100644 --- a/t/lib/DBICTest/Schema.pm +++ b/t/lib/DBICTest/Schema.pm @@ -144,6 +144,17 @@ sub connection { ; }; + # DBD::Firebird and DBD::InterBase could very well talk to the same RDBMS + # make an educated guesstimate based on the DSN + # (worst case scenario we are wrong and the scripts have to wait on each + # other even without actually being able to interfere among themselves) + if ( + ($locktype||'') eq 'InterBase' + and + $_[0] =~ /firebird/i + ) { + $locktype = 'Firebird'; + } # Never hold more than one lock. This solves the "lock in order" issues # unrelated tests may have