mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-21 11:30:24 +00:00
Implement --utc.
This commit is contained in:
@@ -89,11 +89,11 @@ PerconaTest::wait_for_table($slave1_dbh, 'test.heartbeat', 'server_id=12345');
|
||||
my $slave1_dsn = $sb->dsn_for('slave1');
|
||||
# Using full_output here to work around a Perl bug: Only the first explicit
|
||||
# tzset works.
|
||||
($output) = output(sub {
|
||||
($output) = full_output(sub {
|
||||
local $ENV{TZ} = '-09:00';
|
||||
tzset();
|
||||
pt_heartbeat::main($slave1_dsn, qw(--database test --table heartbeat),
|
||||
qw(--check --master-server-id), $master_port)
|
||||
qw(--utc --check --master-server-id), $master_port)
|
||||
});
|
||||
|
||||
# If the servers use UTC then the lag should be 0.00, or at least
|
||||
@@ -102,12 +102,11 @@ my $slave1_dsn = $sb->dsn_for('slave1');
|
||||
like(
|
||||
$output,
|
||||
qr/\A\d.\d{2}$/,
|
||||
"Bug 886059: pt-heartbeat doesn't get confused with differing timezones"
|
||||
"--utc bypasses time zone differences (bug 886059, bug 1099665)"
|
||||
);
|
||||
|
||||
stop_all_instances();
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# pt-heartbeat 2.1.8 doesn't use precision/sub-second timestamps
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1103221
|
||||
|
Reference in New Issue
Block a user