mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-21 10:17:18 +00:00
5s default wait_until() time. Wait 5m instead of 16m for wipe_clean(). Don't connect to slave2 in wipe_clean() any longer.
This commit is contained in:
@@ -233,7 +233,7 @@ sub parse_file {
|
||||
sub wait_until {
|
||||
my ( $code, $t, $max_t ) = @_;
|
||||
$t ||= .20;
|
||||
$max_t ||= 5;
|
||||
$max_t ||= 30;
|
||||
|
||||
my $slept = 0;
|
||||
while ( $slept <= $max_t ) {
|
||||
|
@@ -185,9 +185,8 @@ sub wipe_clean {
|
||||
$dbh->do("DROP DATABASE IF EXISTS `$db`");
|
||||
}
|
||||
|
||||
my $slave2_dbh = $self->get_dbh_for('slave2');
|
||||
$self->wait_for_slaves();
|
||||
$slave2_dbh->disconnect;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,8 +310,7 @@ sub ok {
|
||||
return !@errors;
|
||||
}
|
||||
|
||||
# Dings a heartbeat on the master, and waits until the slave catches up fully to
|
||||
# that.
|
||||
# Dings a heartbeat on the master, and waits until the slave catches up fully.
|
||||
sub wait_for_slaves {
|
||||
my $self = shift;
|
||||
my $now = time();
|
||||
@@ -324,7 +322,7 @@ sub wait_for_slaves {
|
||||
my $then = $slave2_dbh->selectall_arrayref(
|
||||
"select a from percona_test.sentinel where id = 1")->[0]->[0];
|
||||
return $now == $then;
|
||||
}, undef, 1000
|
||||
}, undef, 300
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user