X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Freplicated.t;h=b735e0fa6f97a3d4be53014c685ac70df2953ec3;hb=961d79dbe25ef8a92e867fcc84914b4bf568c11d;hp=dfd3870fbc8b7e16316f11fef610a57442f13383;hpb=6287275c620da0668aa46d4f98b594ad219c4511;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/replicated.t b/t/storage/replicated.t index dfd3870..b735e0f 100644 --- a/t/storage/replicated.t +++ b/t/storage/replicated.t @@ -24,7 +24,6 @@ use Test::Exception; use List::Util 'first'; use Scalar::Util 'reftype'; use File::Spec; -use IO::Handle; use Moose(); use MooseX::Types(); note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Types::VERSION"; @@ -204,10 +203,11 @@ TESTSCHEMACLASSES: { } } - ## Cleanup after ourselves. Unlink all gthe slave paths. + ## Cleanup after ourselves. Unlink all the slave paths. sub cleanup { my $self = shift @_; + $_->disconnect for values %{ $self->schema->storage->replicants }; foreach my $slave (@{$self->slave_paths}) { if(-e $slave) { unlink $slave; @@ -912,6 +912,7 @@ is $debug{storage_type}, 'REPLICANT', "got last query from a replicant: $debug{d is $debug{storage_type}, 'REPLICANT', "got last query from a replicant: $debug{dsn}"; } + ## Delete the old database files $replicated->cleanup;