Skip to content

Commit

Permalink
move Test::mysqld::Multi into Test::mysqld
Browse files Browse the repository at this point in the history
Test::mysqld->start_mysqls was implemented by kazuho/p5-test-mysqld#13
  • Loading branch information
shogo82148 committed Dec 20, 2016
1 parent 05f426c commit fac1bfc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 82 deletions.
2 changes: 1 addition & 1 deletion cpanfile
Expand Up @@ -3,7 +3,7 @@ requires 'Cache::FastMmap';
requires 'File::Temp';
requires 'Mouse';
requires 'POSIX::AtFork';
requires 'Test::mysqld';
requires 'Test::mysqld', '0.20';
requires 'parent';

on build => sub {
Expand Down
78 changes: 0 additions & 78 deletions lib/Test/mysqld/Multi.pm

This file was deleted.

5 changes: 2 additions & 3 deletions lib/Test/mysqld/Pool.pm
Expand Up @@ -4,7 +4,6 @@ use warnings;
use Mouse;
use Test::mysqld;
use Cache::FastMmap;
use Test::mysqld::Multi;

has jobs => ( is => 'rw', isa => 'Int', );
has share_file => ( is => 'rw', isa => 'Str', required => 1 );
Expand Down Expand Up @@ -38,7 +37,7 @@ has _owner_pid => ( is => 'ro', isa => 'Int', default => sub { $$ } );
sub prepare {
my ($self) = @_;

my @instances = Test::mysqld::Multi->start_mysqlds($self->jobs, my_cnf => $self->my_cnf);
my @instances = Test::mysqld->start_mysqlds($self->jobs, my_cnf => $self->my_cnf);
$self->instances( \@instances );
if ($self->preparer) {
$self->preparer->($_) for @instances;
Expand Down Expand Up @@ -106,7 +105,7 @@ sub _pid_lives {

sub DESTROY {
my $self = shift;
Test::mysqld::Multi->stop_mysqlds(@{$self->instances})
Test::mysqld->stop_mysqlds(@{$self->instances})
if $self->instances && $$ == $self->_owner_pid;
}

Expand Down

0 comments on commit fac1bfc

Please sign in to comment.