From: Peter Rabbitson Date: Thu, 18 Nov 2010 07:10:48 +0000 (+0100) Subject: Suppress replicated test warnings on win32 as well X-Git-Tag: v0.08125~50 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7672675a2bafc1ddc0bd4237c01c36acfdcda71c;p=dbsrgits%2FDBIx-Class.git Suppress replicated test warnings on win32 as well --- diff --git a/t/storage/replicated.t b/t/storage/replicated.t index 38ddcb1..56d141a 100644 --- a/t/storage/replicated.t +++ b/t/storage/replicated.t @@ -22,6 +22,8 @@ note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Typ 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'; use_ok 'DBIx::Class::Storage::DBI::Replicated::Balancer'; use_ok 'DBIx::Class::Storage::DBI::Replicated::Replicant'; @@ -381,7 +383,7 @@ ok @replicant_names, "found replicant names @replicant_names"; ## Silence warning about not supporting the is_replicating method if using the ## sqlite dbs. $replicated->schema->storage->debugobj->silence(1) - if first { m{^t/} } @replicant_names; + if first { $_ =~ /$var_dir/ } @replicant_names; isa_ok $replicated->schema->storage->balancer->current_replicant => 'DBIx::Class::Storage::DBI'; @@ -429,7 +431,7 @@ $replicated->schema->storage->replicants->{$replicant_names[1]}->active(1); ## Silence warning about not supporting the is_replicating method if using the ## sqlite dbs. $replicated->schema->storage->debugobj->silence(1) - if first { m{^t/} } @replicant_names; + if first { $_ =~ /$var_dir/ } @replicant_names; $replicated->schema->storage->pool->validate_replicants; @@ -612,7 +614,7 @@ $replicated->schema->storage->replicants->{$replicant_names[1]}->active(1); ## Silence warning about not supporting the is_replicating method if using the ## sqlite dbs. $replicated->schema->storage->debugobj->silence(1) - if first { m{^t/} } @replicant_names; + if first { $_ =~ /$var_dir/ } @replicant_names; $replicated->schema->storage->pool->validate_replicants;