Remove useless 'Reconnected to slave' message in pt-slave-delay and fix standard_options.t so output doesn't show up as test errors.

This commit is contained in:
Daniel Nichter
2012-08-22 11:08:47 -06:00
parent e85e647b86
commit 1c838e283f
2 changed files with 6 additions and 3 deletions

View File

@@ -2592,7 +2592,6 @@ sub main {
try => sub { try => sub {
return unless $oktorun; return unless $oktorun;
$status = $slave_dbh->selectrow_hashref("SHOW SLAVE STATUS"); $status = $slave_dbh->selectrow_hashref("SHOW SLAVE STATUS");
info("Reconnected to slave");
return $status; return $status;
}, },
fail => sub { fail => sub {

View File

@@ -31,8 +31,12 @@ my $output;
my $cmd = "$trunk/bin/pt-slave-delay -F /tmp/12346/my.sandbox.cnf h=127.1"; my $cmd = "$trunk/bin/pt-slave-delay -F /tmp/12346/my.sandbox.cnf h=127.1";
my $pid_file = "/tmp/pt-slave-delay-test.$PID"; my $pid_file = "/tmp/pt-slave-delay-test.$PID";
# Check daemonization # Check daemonization. This test used to print to STDOUT, causing
system("$cmd --delay 1m --interval 1s --run-time 5s --daemonize --pid $pid_file 2>&1"); # false-positive test errors. The output isn't needed. The tool
# said "Reconnected to slave" every time it did SHOW SLAVE STATUS,
# so needlessly. That was removed. Now it will print stuff when
# we kill the process, which we don't want either.
system("$cmd --delay 1m --interval 1s --run-time 5s --daemonize --pid $pid_file >/dev/null 2>&1");
PerconaTest::wait_for_files($pid_file); PerconaTest::wait_for_files($pid_file);
chomp(my $pid = `cat $pid_file`); chomp(my $pid = `cat $pid_file`);
$output = `ps x | grep "^[ ]*$pid"`; $output = `ps x | grep "^[ ]*$pid"`;