From f6fd2b7470dc9875ff33ef46121d93bd254e6660 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Fri, 30 Nov 2012 18:14:06 +0000 Subject: [PATCH] Only run t/pt-table-checksum/pxc.t if in cluster mode. --- t/pt-table-checksum/pxc.t | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/t/pt-table-checksum/pxc.t b/t/pt-table-checksum/pxc.t index 46a2d422..e6c3407c 100644 --- a/t/pt-table-checksum/pxc.t +++ b/t/pt-table-checksum/pxc.t @@ -20,10 +20,7 @@ $ENV{PERCONA_TOOLKIT_TEST_USE_DSN_NAMES} = 1; use PerconaTest; use Sandbox; - require "$trunk/bin/pt-table-checksum"; -# Do this after requiring ptc, since it uses Mo -require VersionParser; my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); @@ -31,12 +28,7 @@ my $node1 = $sb->get_dbh_for('node1'); my $node2 = $sb->get_dbh_for('node2'); my $node3 = $sb->get_dbh_for('node3'); -my $db_flavor = VersionParser->new($node1)->flavor(); - -if ( $db_flavor !~ /XtraDB Cluster/ ) { - plan skip_all => "PXC tests"; -} -elsif ( !$node1 ) { +if ( !$node1 ) { plan skip_all => 'Cannot connect to cluster node1'; } elsif ( !$node2 ) { @@ -45,6 +37,9 @@ elsif ( !$node2 ) { elsif ( !$node3 ) { plan skip_all => 'Cannot connect to cluster node3'; } +elsif ( !$sb->is_cluster_mode ) { + plan skip_all => "PXC tests"; +} # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic # so we need to specify --lock-wait-timeout=3 else the tool will die.