mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 11:54:54 +00:00
PT-2161 - Fix tests for pt-slave-restart (#599)
Added REPLICATION_THREADS=0 to tests which suppose that replication is single-threaded, because new default in 8.0 is 4 replication threads. Fixed clean up code in t/pt-slave-restart/pt-slave-restart.t
This commit is contained in:
@@ -20,7 +20,7 @@ if ( $sandbox_version lt '5.6' ) {
|
||||
}
|
||||
|
||||
diag('Restarting the sandbox');
|
||||
diag(`SAKILA=0 GTID=1 $trunk/sandbox/test-env restart`);
|
||||
diag(`SAKILA=0 REPLICATION_THREADS=0 GTID=1 $trunk/sandbox/test-env restart`);
|
||||
diag("Sandbox restarted");
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
|
@@ -15,6 +15,10 @@ use PerconaTest;
|
||||
use Sandbox;
|
||||
require "$trunk/bin/pt-slave-restart";
|
||||
|
||||
diag('Restarting the sandbox');
|
||||
diag(`SAKILA=0 REPLICATION_THREADS=0 GTID=1 $trunk/sandbox/test-env restart`);
|
||||
diag("Sandbox restarted");
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
my $master_dbh = $sb->get_dbh_for('master');
|
||||
@@ -137,7 +141,6 @@ is(
|
||||
# Done.
|
||||
# #############################################################################
|
||||
diag(`rm -f /tmp/pt-slave-re*`);
|
||||
$sb->wipe_clean($master_dbh);
|
||||
$sb->wipe_clean($slave_dbh);
|
||||
diag(`$trunk/sandbox/test-env restart`);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user