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:
Sveta Smirnova
2023-02-22 19:02:13 +03:00
committed by GitHub
parent aa1ab5d172
commit 09d9d1a6e4
2 changed files with 6 additions and 3 deletions

View File

@@ -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);

View File

@@ -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;