Recognize root source unqualified columns under limited prefetch
[dbsrgits/DBIx-Class.git] / t / storage / replicated.t
index 3f813aa..c8d469f 100644 (file)
@@ -3,12 +3,22 @@ use warnings;
 
 use Test::More;
 
+use lib qw(t/lib);
+use DBICTest;
+
 BEGIN {
     require DBIx::Class;
     plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_replicated')
       unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_replicated');
 }
 
+
+if (DBICTest::RunMode->is_smoker) {
+  my $mver = Moose->VERSION;
+  plan skip_all => "A trial version $mver of Moose detected known to break replication - skipping test known to fail"
+    if ($mver >= 1.99 and $mver <= 1.9902);
+}
+
 use Test::Moose;
 use Test::Exception;
 use List::Util 'first';
@@ -19,9 +29,6 @@ use Moose();
 use MooseX::Types();
 note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Types::VERSION";
 
-use lib qw(t/lib);
-use DBICTest;
-
 my $var_dir = quotemeta ( File::Spec->catdir(qw/t var/) );
 
 use_ok 'DBIx::Class::Storage::DBI::Replicated::Pool';
@@ -72,15 +79,8 @@ TESTSCHEMACLASSES: {
     ## Get the Schema and set the replication storage type
 
     sub init_schema {
-        # current SQLT SQLite producer does not handle DROP TABLE IF EXISTS, trap warnings here
-        local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /no such table.+DROP TABLE/s };
-
-        my ($class, $schema_method) = @_;
-
-        my $method = "get_schema_$schema_method";
-        my $schema = $class->$method;
-
-        return $schema;
+        #my ($class, $schema_getter) = @_;
+        shift->${\ ( 'get_schema_' . shift ) };
     }
 
     sub get_schema_by_storage_type {