From 7e880b080811a284854482fadb428e6d4babd826 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Sun, 3 Jun 2012 12:59:56 -0400 Subject: [PATCH] Call Sandbox::box() in all tests that use Sandbox. --- t/lib/ChangeHandler.t | 3 ++- t/lib/CompareQueryTimes.t | 3 ++- t/lib/CompareResults.t | 3 ++- t/lib/CompareWarnings.t | 3 ++- t/lib/CopyRowsInsertSelect.t | 3 ++- t/lib/Cxn.t | 4 +++- t/lib/ExplainAnalyzer.t | 3 ++- t/lib/IndexUsage.t | 3 ++- t/lib/KeySize.t | 3 ++- t/lib/MasterSlave.t | 3 ++- t/lib/MockSyncStream.t | 3 ++- t/lib/MySQLConfig.t | 3 ++- t/lib/NibbleIterator.t | 3 ++- t/lib/OSCCaptureSync.t | 3 ++- t/lib/OobNibbleIterator.t | 3 ++- t/lib/Outfile.t | 3 ++- t/lib/QueryReportFormatter.t | 3 ++- t/lib/QueryReview.t | 3 ++- t/lib/Quoter.t | 3 ++- t/lib/RowChecksum.t | 3 ++- t/lib/RowDiff-custom.t | 3 ++- t/lib/RowDiff.t | 3 ++- t/lib/SchemaIterator.t | 3 ++- t/lib/TableChecksum.t | 3 ++- t/lib/TableChunker.t | 3 ++- t/lib/TableParser.t | 3 ++- t/lib/TableSyncChunk.t | 3 ++- t/lib/TableSyncNibble.t | 3 ++- t/lib/TableSyncer.t | 3 ++- t/lib/Transformers.t | 3 ++- t/lib/VersionParser.t | 3 ++- t/pt-archiver/basics.t | 3 ++- t/pt-archiver/bulk_delete.t | 3 ++- t/pt-archiver/bulk_insert.t | 3 ++- t/pt-archiver/bulk_regular_insert.t | 3 ++- t/pt-archiver/check_slave_lag.t | 3 ++- t/pt-archiver/compact_col_vals.t | 3 ++- t/pt-archiver/delete_more.t | 3 ++- t/pt-archiver/dest.t | 3 ++- t/pt-archiver/file.t | 3 ++- t/pt-archiver/gt_n.t | 3 ++- t/pt-archiver/indexes.t | 3 ++- t/pt-archiver/issue_1152.t | 3 ++- t/pt-archiver/issue_1166.t | 3 ++- t/pt-archiver/issue_1225.t | 3 ++- t/pt-archiver/issue_1229.t | 3 ++- t/pt-archiver/issue_131.t | 3 ++- t/pt-archiver/issue_524.t | 3 ++- t/pt-archiver/issue_655.t | 3 ++- t/pt-archiver/plugin.t | 3 ++- t/pt-archiver/purge.t | 3 ++- t/pt-archiver/res_fk.t | 3 ++- t/pt-archiver/safe_auto_increment.t | 3 ++- t/pt-archiver/standard_options.t | 3 ++- t/pt-config-diff/basics.t | 3 ++- t/pt-config-diff/reports.t | 3 ++- t/pt-deadlock-logger/basics.t | 3 ++- t/pt-deadlock-logger/clear_deadlocks.t | 3 ++- t/pt-deadlock-logger/create_dest_table.t | 3 ++- t/pt-deadlock-logger/standard_options.t | 3 ++- t/pt-duplicate-key-checker/basics.t | 3 ++- t/pt-duplicate-key-checker/clustered_keys.t | 3 ++- t/pt-duplicate-key-checker/issue_1192.t | 3 ++- t/pt-duplicate-key-checker/issue_298.t | 3 ++- t/pt-duplicate-key-checker/issue_331.t | 3 ++- t/pt-duplicate-key-checker/issue_663.t | 3 ++- t/pt-find/pt-find.t | 3 ++- t/pt-fk-error-logger/basics.t | 3 ++- t/pt-heartbeat/basics.t | 3 ++- t/pt-heartbeat/multi_update_mode.t | 3 ++- t/pt-heartbeat/standard_options.t | 3 ++- t/pt-index-usage/basics.t | 3 ++- t/pt-index-usage/save_results.t | 3 ++- t/pt-ioprofile/pt-ioprofile.t | 3 ++- t/pt-kill/basics.t | 3 ++- t/pt-kill/execute_command.t | 3 ++- t/pt-kill/kill.t | 3 ++- t/pt-kill/match.t | 3 ++- t/pt-kill/standard_options.t | 3 ++- t/pt-log-player/issue_799.t | 3 ++- t/pt-log-player/issue_903.t | 3 ++- t/pt-log-player/play.t | 3 ++- t/pt-online-schema-change/alter_active_table.t | 3 ++- t/pt-online-schema-change/basics.t | 3 ++- t/pt-online-schema-change/check_tables.t | 3 ++- t/pt-query-advisor/get_create_table.t | 3 ++- t/pt-query-advisor/review.t | 3 ++- t/pt-query-digest/collect_and_report_cycles.t | 3 ++- t/pt-query-digest/daemon.t | 3 ++- t/pt-query-digest/execute.t | 3 ++- t/pt-query-digest/explain.t | 3 ++- t/pt-query-digest/explain_partitions.t | 3 ++- t/pt-query-digest/issue_1186.t | 3 ++- t/pt-query-digest/issue_360.t | 3 ++- t/pt-query-digest/mirror.t | 3 ++- t/pt-query-digest/processlist.t | 3 ++- t/pt-query-digest/review.t | 3 ++- t/pt-query-digest/run_time.t | 3 ++- t/pt-query-digest/since_until.t | 3 ++- t/pt-query-digest/standard_options.t | 3 ++- t/pt-show-grants/all_grants.t | 3 ++- t/pt-show-grants/basics.t | 3 ++- t/pt-show-grants/issue_445.t | 3 ++- t/pt-slave-delay/basics.t | 3 ++- t/pt-slave-delay/standard_options.t | 3 ++- t/pt-slave-find/pt-slave-find.t | 3 ++- t/pt-slave-restart/pt-slave-restart.t | 3 ++- t/pt-stalk/pt-stalk.t | 3 ++- t/pt-table-checksum/basics.t | 3 ++- t/pt-table-checksum/char_chunking.t | 3 ++- t/pt-table-checksum/chunk_index.t | 3 ++- t/pt-table-checksum/chunk_size.t | 3 ++- t/pt-table-checksum/create_replicate_table.t | 3 ++- t/pt-table-checksum/error_handling.t | 3 ++- t/pt-table-checksum/filters.t | 3 ++- t/pt-table-checksum/float_precision.t | 3 ++- t/pt-table-checksum/fnv_64.t | 3 ++- t/pt-table-checksum/ignore_columns.t | 3 ++- t/pt-table-checksum/issue_388.t | 3 ++- t/pt-table-checksum/issue_47.t | 3 ++- t/pt-table-checksum/issue_602.t | 3 ++- t/pt-table-checksum/progress.t | 3 ++- t/pt-table-checksum/replication_filters.t | 3 ++- t/pt-table-checksum/resume.t | 3 ++- t/pt-table-checksum/standard_options.t | 3 ++- t/pt-table-checksum/throttle.t | 3 ++- t/pt-table-sync/basics.t | 3 ++- t/pt-table-sync/bidirectional.t | 3 ++- t/pt-table-sync/binlog_format.t | 3 ++- t/pt-table-sync/char_chunking.t | 3 ++- t/pt-table-sync/check_privs.t | 3 ++- t/pt-table-sync/columns.t | 3 ++- t/pt-table-sync/filters.t | 3 ++- t/pt-table-sync/float_precision.t | 3 ++- t/pt-table-sync/force_index.t | 3 ++- t/pt-table-sync/hex_blob.t | 3 ++- t/pt-table-sync/instrumentaiton.t | 3 ++- t/pt-table-sync/issue_1052.t | 3 ++- t/pt-table-sync/issue_1065.t | 3 ++- t/pt-table-sync/issue_218.t | 3 ++- t/pt-table-sync/issue_22.t | 3 ++- t/pt-table-sync/issue_262.t | 3 ++- t/pt-table-sync/issue_408.t | 3 ++- t/pt-table-sync/issue_560.t | 3 ++- t/pt-table-sync/issue_616.t | 3 ++- t/pt-table-sync/issue_627.t | 3 ++- t/pt-table-sync/issue_631.t | 3 ++- t/pt-table-sync/issue_634.t | 3 ++- t/pt-table-sync/issue_644.t | 3 ++- t/pt-table-sync/issue_79.t | 3 ++- t/pt-table-sync/issue_804.t | 3 ++- t/pt-table-sync/issue_920.t | 3 ++- t/pt-table-sync/issue_96.t | 3 ++- t/pt-table-sync/issue_965.t | 3 ++- t/pt-table-sync/issue_996.t | 3 ++- t/pt-table-sync/lock_and_rename.t | 3 ++- t/pt-table-sync/lock_level.t | 3 ++- t/pt-table-sync/replicate_do_db.t | 3 ++- t/pt-table-sync/specify_column_or_index.t | 3 ++- t/pt-table-sync/sync_to_differnt_db.t | 3 ++- t/pt-table-sync/traces.t | 3 ++- t/pt-table-sync/triggers.t | 3 ++- t/pt-table-sync/wait.t | 3 ++- t/pt-table-sync/zero_chunk.t | 3 ++- t/pt-upgrade/basics.t | 3 ++- t/pt-upgrade/daemon.t | 3 ++- t/pt-upgrade/rewrite_non_select.t | 3 ++- t/pt-upgrade/skip_non_select.t | 3 ++- t/pt-upgrade/warnings.t | 3 ++- t/pt-variable-advisor/show_variables_online.t | 3 ++- 170 files changed, 341 insertions(+), 170 deletions(-) diff --git a/t/lib/ChangeHandler.t b/t/lib/ChangeHandler.t index 87d7a53b..4463758d 100644 --- a/t/lib/ChangeHandler.t +++ b/t/lib/ChangeHandler.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 32; +use Test::More tests => 33; use ChangeHandler; use Quoter; @@ -471,4 +471,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh) if $dbh; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/CompareQueryTimes.t b/t/lib/CompareQueryTimes.t index 972b182f..628966fa 100644 --- a/t/lib/CompareQueryTimes.t +++ b/t/lib/CompareQueryTimes.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 24; + plan tests => 25; } $sb->create_dbs($dbh, ['test']); @@ -192,4 +192,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/CompareResults.t b/t/lib/CompareResults.t index 042e5824..414b9ef5 100644 --- a/t/lib/CompareResults.t +++ b/t/lib/CompareResults.t @@ -43,7 +43,7 @@ elsif ( !$dbh2 ) { plan skip_all => "Cannot connect to sandbox slave"; } else { - plan tests => 56; + plan tests => 57; } Transformers->import(qw(make_checksum)); @@ -777,4 +777,5 @@ like( diag(`rm -rf $tmpdir`); diag(`rm -rf /tmp/*outfile.txt`); $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/CompareWarnings.t b/t/lib/CompareWarnings.t index 07c49edd..d65f3b11 100644 --- a/t/lib/CompareWarnings.t +++ b/t/lib/CompareWarnings.t @@ -28,7 +28,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 20; + plan tests => 21; } $sb->create_dbs($dbh, ['test']); @@ -360,4 +360,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/CopyRowsInsertSelect.t b/t/lib/CopyRowsInsertSelect.t index 361775df..56e48644 100644 --- a/t/lib/CopyRowsInsertSelect.t +++ b/t/lib/CopyRowsInsertSelect.t @@ -39,7 +39,7 @@ elsif ( !@{$dbh->selectcol_arrayref('SHOW DATABASES LIKE "sakila"')} ) { plan skip_all => "Sandbox master does not have the sakila database"; } else { - plan tests => 14; + plan tests => 15; } my $q = new Quoter(); @@ -216,4 +216,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/Cxn.t b/t/lib/Cxn.t index 980511d7..b90fc626 100644 --- a/t/lib/Cxn.t +++ b/t/lib/Cxn.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 16; +use Test::More tests => 17; use Sandbox; use OptionParser; @@ -208,6 +208,7 @@ is( $hostname, 'name() uses @@hostname' ); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; # ############################################################################ # Default cxn, should be equivalent to 'h=localhost'. @@ -255,4 +256,5 @@ $o->get_opts(); # Done. # ############################################################################# $master_dbh->disconnect() if $master_dbh; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/ExplainAnalyzer.t b/t/lib/ExplainAnalyzer.t index 03593624..264bfdcd 100644 --- a/t/lib/ExplainAnalyzer.t +++ b/t/lib/ExplainAnalyzer.t @@ -32,7 +32,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 16; + plan tests => 17; } $dbh->do('use sakila'); @@ -574,4 +574,5 @@ is( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/IndexUsage.t b/t/lib/IndexUsage.t index f05eb401..970bef9b 100644 --- a/t/lib/IndexUsage.t +++ b/t/lib/IndexUsage.t @@ -10,7 +10,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 6; +use Test::More tests => 7; use constant PTDEBUG => $ENV{PTDEBUG} || 0; use IndexUsage; @@ -250,4 +250,5 @@ SKIP: { # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/KeySize.t b/t/lib/KeySize.t index c8e9521e..26b9a9d2 100644 --- a/t/lib/KeySize.t +++ b/t/lib/KeySize.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 18; + plan tests => 19; } my $q = new Quoter(); @@ -205,4 +205,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/MasterSlave.t b/t/lib/MasterSlave.t index 72fce9fa..a780e0ad 100644 --- a/t/lib/MasterSlave.t +++ b/t/lib/MasterSlave.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 47; +use Test::More tests => 48; use MasterSlave; use DSNParser; @@ -612,4 +612,5 @@ diag(`$trunk/sandbox/stop-sandbox 2903 2902 2901 2900 >/dev/null`); diag(`/tmp/12346/use -e "set global read_only=1"`); diag(`/tmp/12347/use -e "set global read_only=1"`); diag(`$trunk/sandbox/test-env reset`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/MockSyncStream.t b/t/lib/MockSyncStream.t index f0946988..6ff54f3e 100644 --- a/t/lib/MockSyncStream.t +++ b/t/lib/MockSyncStream.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 5; +use Test::More tests => 6; use MockSyncStream; use Quoter; @@ -199,4 +199,5 @@ SKIP: { # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/MySQLConfig.t b/t/lib/MySQLConfig.t index 0295d025..86cde81c 100644 --- a/t/lib/MySQLConfig.t +++ b/t/lib/MySQLConfig.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 29; +use Test::More tests => 30; use MySQLConfig; use DSNParser; @@ -840,4 +840,5 @@ like( qr/Complete test coverage/, '_d() works' ); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/NibbleIterator.t b/t/lib/NibbleIterator.t index 0601ba0d..f3e6fb6e 100644 --- a/t/lib/NibbleIterator.t +++ b/t/lib/NibbleIterator.t @@ -39,7 +39,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 46; + plan tests => 47; } my $q = new Quoter(); @@ -809,4 +809,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/OSCCaptureSync.t b/t/lib/OSCCaptureSync.t index 261c861e..ca1206a9 100644 --- a/t/lib/OSCCaptureSync.t +++ b/t/lib/OSCCaptureSync.t @@ -31,7 +31,7 @@ if ( !$dbh ) { } else { - plan tests => 10; + plan tests => 11; } my $q = new Quoter(); @@ -128,4 +128,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/OobNibbleIterator.t b/t/lib/OobNibbleIterator.t index 8741b693..c06b21ba 100644 --- a/t/lib/OobNibbleIterator.t +++ b/t/lib/OobNibbleIterator.t @@ -41,7 +41,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 15; + plan tests => 16; } my $q = new Quoter(); @@ -261,4 +261,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/Outfile.t b/t/lib/Outfile.t index 41d8fb18..90fe2161 100644 --- a/t/lib/Outfile.t +++ b/t/lib/Outfile.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 1; +use Test::More tests => 2; use Outfile; use DSNParser; @@ -69,4 +69,5 @@ ok( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/QueryReportFormatter.t b/t/lib/QueryReportFormatter.t index 09b86926..12213113 100644 --- a/t/lib/QueryReportFormatter.t +++ b/t/lib/QueryReportFormatter.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 44; +use Test::More tests => 45; use Data::Dumper; $Data::Dumper::Indent = 1; @@ -1570,4 +1570,5 @@ like( qr/Complete test coverage/, '_d() works' ); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/QueryReview.t b/t/lib/QueryReview.t index ab28140d..6c314954 100644 --- a/t/lib/QueryReview.t +++ b/t/lib/QueryReview.t @@ -30,7 +30,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 8; + plan tests => 9; } $sb->create_dbs($dbh, ['test']); @@ -304,4 +304,5 @@ like( '_d() works' ); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/Quoter.t b/t/lib/Quoter.t index ca98eefc..2c742f37 100644 --- a/t/lib/Quoter.t +++ b/t/lib/Quoter.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 54; +use Test::More tests => 55; use Quoter; use PerconaTest; @@ -212,4 +212,5 @@ SKIP: { # ########################################################################### # Done. # ########################################################################### +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/RowChecksum.t b/t/lib/RowChecksum.t index a2bcb465..0c2f29ff 100644 --- a/t/lib/RowChecksum.t +++ b/t/lib/RowChecksum.t @@ -27,7 +27,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 28; + plan tests => 29; } $sb->create_dbs($dbh, ['test']); @@ -425,4 +425,5 @@ is( # Done. # ############################################################################ $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/RowDiff-custom.t b/t/lib/RowDiff-custom.t index 22ec79b2..be108308 100644 --- a/t/lib/RowDiff-custom.t +++ b/t/lib/RowDiff-custom.t @@ -92,7 +92,7 @@ elsif ( !$slave_dbh ) { plan skip_all => "Cannot connect to sandbox slave"; } else { - plan tests => 4; + plan tests => 5; } @@ -187,4 +187,5 @@ is_deeply( $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/RowDiff.t b/t/lib/RowDiff.t index c5f0dea9..83ffd5af 100644 --- a/t/lib/RowDiff.t +++ b/t/lib/RowDiff.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 26; +use Test::More tests => 27; use MockSync; use RowDiff; @@ -549,4 +549,5 @@ SKIP: { $sb->wipe_clean($slave_dbh); } +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/SchemaIterator.t b/t/lib/SchemaIterator.t index 74f134d3..a1333412 100644 --- a/t/lib/SchemaIterator.t +++ b/t/lib/SchemaIterator.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 31; +use Test::More tests => 32; use SchemaIterator; use FileIterator; @@ -434,4 +434,5 @@ test_so( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableChecksum.t b/t/lib/TableChecksum.t index a6069005..7a6b6f6a 100644 --- a/t/lib/TableChecksum.t +++ b/t/lib/TableChecksum.t @@ -27,7 +27,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 51; + plan tests => 52; } $sb->create_dbs($dbh, ['test']); @@ -665,4 +665,5 @@ is($query, 'Ignores specified columns'); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableChunker.t b/t/lib/TableChunker.t index 201949fb..4104940f 100644 --- a/t/lib/TableChunker.t +++ b/t/lib/TableChunker.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 91; + plan tests => 92; } $sb->create_dbs($dbh, ['test']); @@ -1314,4 +1314,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableParser.t b/t/lib/TableParser.t index 45390605..e30b431e 100644 --- a/t/lib/TableParser.t +++ b/t/lib/TableParser.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 39; +use Test::More tests => 40; use TableParser; use Quoter; @@ -899,4 +899,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh) if $dbh; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableSyncChunk.t b/t/lib/TableSyncChunk.t index 57dd64ac..6adf3097 100644 --- a/t/lib/TableSyncChunk.t +++ b/t/lib/TableSyncChunk.t @@ -21,7 +21,7 @@ my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); my $dbh = $sb->get_dbh_for('master'); if ( $dbh ) { - plan tests => 34; + plan tests => 35; } else { plan skip_all => 'Cannot connect to MySQL'; @@ -403,4 +403,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableSyncNibble.t b/t/lib/TableSyncNibble.t index 03278853..a1f9e831 100644 --- a/t/lib/TableSyncNibble.t +++ b/t/lib/TableSyncNibble.t @@ -34,7 +34,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 36; + plan tests => 37; } my $mysql = $sb->_use_for('master'); @@ -629,4 +629,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/TableSyncer.t b/t/lib/TableSyncer.t index 8df90bd2..a581c20d 100644 --- a/t/lib/TableSyncer.t +++ b/t/lib/TableSyncer.t @@ -50,7 +50,7 @@ elsif ( !$dst_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 61; + plan tests => 62; } $sb->create_dbs($dbh, ['test']); @@ -1076,4 +1076,5 @@ like( ); $sb->wipe_clean($src_dbh); $sb->wipe_clean($dst_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/Transformers.t b/t/lib/Transformers.t index 99db6ac0..1d4f8862 100644 --- a/t/lib/Transformers.t +++ b/t/lib/Transformers.t @@ -12,7 +12,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 49; +use Test::More tests => 50; use Transformers; use PerconaTest; @@ -193,4 +193,5 @@ is( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/lib/VersionParser.t b/t/lib/VersionParser.t index f54f0556..3c4503dc 100644 --- a/t/lib/VersionParser.t +++ b/t/lib/VersionParser.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 3; +use Test::More tests => 4; use VersionParser; use PerconaTest; @@ -42,4 +42,5 @@ SKIP: { # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/basics.t b/t/pt-archiver/basics.t index 416d7410..c440a9b6 100644 --- a/t/pt-archiver/basics.t +++ b/t/pt-archiver/basics.t @@ -36,7 +36,7 @@ if ( ($rows || 0) != 4 ) { plan skip_all => 'Failed to load tables1-4.sql'; } else { - plan tests => 23; + plan tests => 24; } my @args = qw(--dry-run --where 1=1); @@ -147,4 +147,5 @@ is($output + 0, 4, 'All 4 rows are still there'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/bulk_delete.t b/t/pt-archiver/bulk_delete.t index 159f06bd..0569f7af 100644 --- a/t/pt-archiver/bulk_delete.t +++ b/t/pt-archiver/bulk_delete.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 13; + plan tests => 14; } my $output; @@ -71,4 +71,5 @@ is($output + 0, 105, 'Bulk delete works OK with normal insert'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/bulk_insert.t b/t/pt-archiver/bulk_insert.t index d19fc060..6bd093e5 100644 --- a/t/pt-archiver/bulk_insert.t +++ b/t/pt-archiver/bulk_insert.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 9; + plan tests => 10; } my $output; @@ -88,4 +88,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/bulk_regular_insert.t b/t/pt-archiver/bulk_regular_insert.t index ef9ce0e1..70babac4 100644 --- a/t/pt-archiver/bulk_regular_insert.t +++ b/t/pt-archiver/bulk_regular_insert.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 4; + plan tests => 5; } my $output; @@ -94,4 +94,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/check_slave_lag.t b/t/pt-archiver/check_slave_lag.t index 9ed4e799..f39a16de 100644 --- a/t/pt-archiver/check_slave_lag.t +++ b/t/pt-archiver/check_slave_lag.t @@ -27,7 +27,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 6; + plan tests => 7; } $sb->wipe_clean($dbh); @@ -100,4 +100,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($dbh); $sb->wipe_clean($dbh2); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/compact_col_vals.t b/t/pt-archiver/compact_col_vals.t index d620a0c1..8c6295c0 100644 --- a/t/pt-archiver/compact_col_vals.t +++ b/t/pt-archiver/compact_col_vals.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $output; @@ -81,4 +81,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/delete_more.t b/t/pt-archiver/delete_more.t index 700f4a11..d2ce9a49 100644 --- a/t/pt-archiver/delete_more.t +++ b/t/pt-archiver/delete_more.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 18; + plan tests => 19; } my $output; @@ -297,4 +297,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/dest.t b/t/pt-archiver/dest.t index 84fc4e47..b45faefe 100644 --- a/t/pt-archiver/dest.t +++ b/t/pt-archiver/dest.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 13; + plan tests => 14; } my $output; @@ -101,4 +101,5 @@ is($output + 0, 10, 'Rows got archived'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/file.t b/t/pt-archiver/file.t index 0bde28fe..bffd9f11 100644 --- a/t/pt-archiver/file.t +++ b/t/pt-archiver/file.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 5; + plan tests => 6; } my $output; @@ -75,4 +75,5 @@ EOF # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/gt_n.t b/t/pt-archiver/gt_n.t index 59d7a302..5502cfb7 100644 --- a/t/pt-archiver/gt_n.t +++ b/t/pt-archiver/gt_n.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -62,4 +62,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/indexes.t b/t/pt-archiver/indexes.t index df2e6d39..646b05da 100644 --- a/t/pt-archiver/indexes.t +++ b/t/pt-archiver/indexes.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 17; + plan tests => 18; } my $output; @@ -103,4 +103,5 @@ like ( $output, qr/WHERE \(1=1\) AND \(\(`a` >= \?\)\) LIMIT/, 'Can ascend just # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_1152.t b/t/pt-archiver/issue_1152.t index 47e5342a..b7ef53fe 100644 --- a/t/pt-archiver/issue_1152.t +++ b/t/pt-archiver/issue_1152.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -54,4 +54,5 @@ ok(1, "Issue 1152 test stub"); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_1166.t b/t/pt-archiver/issue_1166.t index 454deab8..749c90b6 100644 --- a/t/pt-archiver/issue_1166.t +++ b/t/pt-archiver/issue_1166.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $output; @@ -82,4 +82,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_1225.t b/t/pt-archiver/issue_1225.t index 71c76401..f406c0d7 100644 --- a/t/pt-archiver/issue_1225.t +++ b/t/pt-archiver/issue_1225.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 4; + plan tests => 5; } my $output; @@ -93,4 +93,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_1229.t b/t/pt-archiver/issue_1229.t index e7f4f835..277144e7 100644 --- a/t/pt-archiver/issue_1229.t +++ b/t/pt-archiver/issue_1229.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -75,4 +75,5 @@ diag(`rm -rf $file >/dev/null`); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_131.t b/t/pt-archiver/issue_131.t index 9f32c719..6ad428f1 100644 --- a/t/pt-archiver/issue_131.t +++ b/t/pt-archiver/issue_131.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -54,4 +54,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_524.t b/t/pt-archiver/issue_524.t index 488d95c8..14db17aa 100644 --- a/t/pt-archiver/issue_524.t +++ b/t/pt-archiver/issue_524.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -49,4 +49,5 @@ unlike( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/issue_655.t b/t/pt-archiver/issue_655.t index d2210c76..ddda3458 100644 --- a/t/pt-archiver/issue_655.t +++ b/t/pt-archiver/issue_655.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -56,4 +56,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/plugin.t b/t/pt-archiver/plugin.t index f8b35b04..ccb60443 100644 --- a/t/pt-archiver/plugin.t +++ b/t/pt-archiver/plugin.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 17; + plan tests => 18; } my $output; @@ -94,4 +94,5 @@ is($output + 0, 2, 'Plugin archived all rows to table_odd OK'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/purge.t b/t/pt-archiver/purge.t index ff270b1c..b1de5170 100644 --- a/t/pt-archiver/purge.t +++ b/t/pt-archiver/purge.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 6; + plan tests => 7; } my $output; @@ -64,4 +64,5 @@ is($output + 0, 1, 'Purged some rows ok'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/res_fk.t b/t/pt-archiver/res_fk.t index b8eacd14..c1619a95 100644 --- a/t/pt-archiver/res_fk.t +++ b/t/pt-archiver/res_fk.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 7; + plan tests => 8; } my $output; @@ -101,4 +101,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/safe_auto_increment.t b/t/pt-archiver/safe_auto_increment.t index 1ee389bb..f5d46d12 100644 --- a/t/pt-archiver/safe_auto_increment.t +++ b/t/pt-archiver/safe_auto_increment.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 4; + plan tests => 5; } my $output; @@ -55,4 +55,5 @@ is($output + 0, 0, "Disabled safeautoinc purged whole table"); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-archiver/standard_options.t b/t/pt-archiver/standard_options.t index 4418b1ca..58f48809 100644 --- a/t/pt-archiver/standard_options.t +++ b/t/pt-archiver/standard_options.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 6; + plan tests => 7; } my $output; @@ -120,4 +120,5 @@ SKIP: { # ############################################################################# $sb->wipe_clean($dbh); $sb->wipe_clean($dbh2) if $dbh2; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-config-diff/basics.t b/t/pt-config-diff/basics.t index 34c81ae6..7dbe430b 100644 --- a/t/pt-config-diff/basics.t +++ b/t/pt-config-diff/basics.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 12; + plan tests => 13; } my $cnf = '/tmp/12345/my.sandbox.cnf'; @@ -165,4 +165,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-config-diff/reports.t b/t/pt-config-diff/reports.t index bf052dce..1afca95b 100644 --- a/t/pt-config-diff/reports.t +++ b/t/pt-config-diff/reports.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } my $cnf = '/tmp/12345/my.sandbox.cnf'; @@ -61,4 +61,5 @@ is( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-deadlock-logger/basics.t b/t/pt-deadlock-logger/basics.t index b2fcb432..1eae935f 100644 --- a/t/pt-deadlock-logger/basics.t +++ b/t/pt-deadlock-logger/basics.t @@ -24,7 +24,7 @@ if ( !$dbh1 || !$dbh2 ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 9; + plan tests => 10; } my $output; @@ -161,4 +161,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-deadlock-logger/clear_deadlocks.t b/t/pt-deadlock-logger/clear_deadlocks.t index 83f52db6..5141e910 100644 --- a/t/pt-deadlock-logger/clear_deadlocks.t +++ b/t/pt-deadlock-logger/clear_deadlocks.t @@ -23,7 +23,7 @@ if ( !$dbh1 ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $output; @@ -66,4 +66,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-deadlock-logger/create_dest_table.t b/t/pt-deadlock-logger/create_dest_table.t index 4f2be205..3206170c 100644 --- a/t/pt-deadlock-logger/create_dest_table.t +++ b/t/pt-deadlock-logger/create_dest_table.t @@ -23,7 +23,7 @@ if ( !$dbh1 ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -54,4 +54,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-deadlock-logger/standard_options.t b/t/pt-deadlock-logger/standard_options.t index 16f203b4..6058ffe0 100644 --- a/t/pt-deadlock-logger/standard_options.t +++ b/t/pt-deadlock-logger/standard_options.t @@ -23,7 +23,7 @@ if ( !$dbh1 ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 9; + plan tests => 10; } my $output; @@ -105,4 +105,5 @@ diag(`rm -rf /tmp/mk-deadlock-logger.pid`); # Done. # ############################################################################# $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/basics.t b/t/pt-duplicate-key-checker/basics.t index 26f4d062..3921463b 100644 --- a/t/pt-duplicate-key-checker/basics.t +++ b/t/pt-duplicate-key-checker/basics.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 8; + plan tests => 9; } my $output; @@ -99,4 +99,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/clustered_keys.t b/t/pt-duplicate-key-checker/clustered_keys.t index 49ce7659..403c699a 100644 --- a/t/pt-duplicate-key-checker/clustered_keys.t +++ b/t/pt-duplicate-key-checker/clustered_keys.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $cnf = "/tmp/12345/my.sandbox.cnf"; @@ -50,4 +50,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/issue_1192.t b/t/pt-duplicate-key-checker/issue_1192.t index 00e05fe1..3ec340f2 100644 --- a/t/pt-duplicate-key-checker/issue_1192.t +++ b/t/pt-duplicate-key-checker/issue_1192.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -51,4 +51,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/issue_298.t b/t/pt-duplicate-key-checker/issue_298.t index 4d72ab40..7f0d7669 100644 --- a/t/pt-duplicate-key-checker/issue_298.t +++ b/t/pt-duplicate-key-checker/issue_298.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -42,4 +42,5 @@ unlike($output, qr/Use of uninitialized var/, 'Does not crash on undef var'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/issue_331.t b/t/pt-duplicate-key-checker/issue_331.t index a1a84b5b..d3151084 100644 --- a/t/pt-duplicate-key-checker/issue_331.t +++ b/t/pt-duplicate-key-checker/issue_331.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $cnf = "/tmp/12345/my.sandbox.cnf"; @@ -50,4 +50,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-duplicate-key-checker/issue_663.t b/t/pt-duplicate-key-checker/issue_663.t index 601dd745..35d1254b 100644 --- a/t/pt-duplicate-key-checker/issue_663.t +++ b/t/pt-duplicate-key-checker/issue_663.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -48,4 +48,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-find/pt-find.t b/t/pt-find/pt-find.t index 3dafcac5..de0453b0 100644 --- a/t/pt-find/pt-find.t +++ b/t/pt-find/pt-find.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 20; + plan tests => 21; } my $output; @@ -210,4 +210,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-fk-error-logger/basics.t b/t/pt-fk-error-logger/basics.t index c4890d83..0ed0ac89 100644 --- a/t/pt-fk-error-logger/basics.t +++ b/t/pt-fk-error-logger/basics.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 7; + plan tests => 8; } $sb->wipe_clean($dbh); @@ -124,4 +124,5 @@ $dbh->do('DROP TABLE test.parent'); # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-heartbeat/basics.t b/t/pt-heartbeat/basics.t index 5a634412..ce7bd5ec 100644 --- a/t/pt-heartbeat/basics.t +++ b/t/pt-heartbeat/basics.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 17; + plan tests => 18; } $sb->create_dbs($dbh, ['test']); @@ -140,4 +140,5 @@ like( # ############################################################################# `rm $pid_file $sent_file 2>/dev/null`; $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-heartbeat/multi_update_mode.t b/t/pt-heartbeat/multi_update_mode.t index af6190db..b9a0502e 100644 --- a/t/pt-heartbeat/multi_update_mode.t +++ b/t/pt-heartbeat/multi_update_mode.t @@ -34,7 +34,7 @@ elsif ( !$slave2_dbh ) { plan skip_all => 'Cannot connect to sandbox slave2'; } else { - plan tests => 28; + plan tests => 29; } $sb->create_dbs($master_dbh, ['test']); @@ -250,4 +250,5 @@ foreach my $port (@ports) { # ############################################################################# diag(`rm -rf /tmp/pt-heartbeat-sentinel >/dev/null`); $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-heartbeat/standard_options.t b/t/pt-heartbeat/standard_options.t index 8a459ce4..8f557017 100644 --- a/t/pt-heartbeat/standard_options.t +++ b/t/pt-heartbeat/standard_options.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } $sb->create_dbs($dbh, [qw(test)]); @@ -51,4 +51,5 @@ like( # Doe. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-index-usage/basics.t b/t/pt-index-usage/basics.t index ee1cef3b..a4e4e917 100644 --- a/t/pt-index-usage/basics.t +++ b/t/pt-index-usage/basics.t @@ -28,7 +28,7 @@ if ( !@{ $dbh->selectall_arrayref('show databases like "sakila"') } ) { plan skip_all => "Sakila database is not loaded"; } else { - plan tests => 8; + plan tests => 9; } my $cnf = '/tmp/12345/my.sandbox.cnf'; @@ -139,4 +139,5 @@ is( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-index-usage/save_results.t b/t/pt-index-usage/save_results.t index 1a310d95..e48f8166 100644 --- a/t/pt-index-usage/save_results.t +++ b/t/pt-index-usage/save_results.t @@ -28,7 +28,7 @@ if ( !@{ $dbh->selectall_arrayref('show databases like "sakila"') } ) { plan skip_all => "Sakila database is not loaded"; } else { - plan tests => 17; + plan tests => 18; } my $cnf = '/tmp/12345/my.sandbox.cnf'; @@ -365,4 +365,5 @@ SKIP: { # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-ioprofile/pt-ioprofile.t b/t/pt-ioprofile/pt-ioprofile.t index fa49df8f..28df30b2 100644 --- a/t/pt-ioprofile/pt-ioprofile.t +++ b/t/pt-ioprofile/pt-ioprofile.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to master sandbox"; } else { - plan tests => 4; + plan tests => 5; } my $output = ""; @@ -70,4 +70,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-kill/basics.t b/t/pt-kill/basics.t index a0621104..ba9dd8e8 100644 --- a/t/pt-kill/basics.t +++ b/t/pt-kill/basics.t @@ -25,7 +25,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $output; @@ -84,4 +84,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-kill/execute_command.t b/t/pt-kill/execute_command.t index 1ae8c348..91ad4b03 100644 --- a/t/pt-kill/execute_command.t +++ b/t/pt-kill/execute_command.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 8; +use Test::More tests => 9; use PerconaTest; use Sandbox; @@ -118,4 +118,5 @@ SKIP: { # ############################################################################# diag(`rm $out 2>/dev/null`); $sb->wipe_clean($master_dbh) if $master_dbh; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-kill/kill.t b/t/pt-kill/kill.t index a5502f53..fa2349fd 100644 --- a/t/pt-kill/kill.t +++ b/t/pt-kill/kill.t @@ -29,7 +29,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 7; + plan tests => 8; } my $output; @@ -120,4 +120,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-kill/match.t b/t/pt-kill/match.t index de414c26..9fbadf51 100644 --- a/t/pt-kill/match.t +++ b/t/pt-kill/match.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 14; +use Test::More tests => 15; use PerconaTest; use Sandbox; @@ -173,4 +173,5 @@ SKIP: { # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-kill/standard_options.t b/t/pt-kill/standard_options.t index f22871e2..7713cae6 100644 --- a/t/pt-kill/standard_options.t +++ b/t/pt-kill/standard_options.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 5; +use Test::More tests => 6; use PerconaTest; use Sandbox; @@ -73,4 +73,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh) if $master_dbh; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-log-player/issue_799.t b/t/pt-log-player/issue_799.t index df5b43d3..2485e7ee 100644 --- a/t/pt-log-player/issue_799.t +++ b/t/pt-log-player/issue_799.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } # ############################################################################# @@ -56,4 +56,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($dbh); diag(`rm -rf ./session-results-*`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-log-player/issue_903.t b/t/pt-log-player/issue_903.t index 93a2637a..5ec1b138 100644 --- a/t/pt-log-player/issue_903.t +++ b/t/pt-log-player/issue_903.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } # ############################################################################# @@ -53,4 +53,5 @@ like( # Done. # ############################################################################# diag(`rm -rf ./session-results-*`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-log-player/play.t b/t/pt-log-player/play.t index 93b72987..b2f4e5d1 100644 --- a/t/pt-log-player/play.t +++ b/t/pt-log-player/play.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 19; + plan tests => 20; } my $output; @@ -94,4 +94,5 @@ diag(`rm session-results-*.txt 2>/dev/null`); # ############################################################################# diag(`rm -rf $tmpdir 2>/dev/null`); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-online-schema-change/alter_active_table.t b/t/pt-online-schema-change/alter_active_table.t index 10221dc3..a1bfc6c4 100644 --- a/t/pt-online-schema-change/alter_active_table.t +++ b/t/pt-online-schema-change/alter_active_table.t @@ -28,7 +28,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 7; + plan tests => 8; } my $output = ""; @@ -191,4 +191,5 @@ check_ids('mkosc', 'a', 'i', get_ids()); diag(`rm -rf $query_table_stop`); diag(`rm -rf $query_table_output`); $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-online-schema-change/basics.t b/t/pt-online-schema-change/basics.t index 2546f838..87305959 100644 --- a/t/pt-online-schema-change/basics.t +++ b/t/pt-online-schema-change/basics.t @@ -25,7 +25,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 22; + plan tests => 23; } my $output = ""; @@ -281,4 +281,5 @@ test_table( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-online-schema-change/check_tables.t b/t/pt-online-schema-change/check_tables.t index 650870c1..7cc86692 100644 --- a/t/pt-online-schema-change/check_tables.t +++ b/t/pt-online-schema-change/check_tables.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 8; + plan tests => 9; } my $vp = new VersionParser(); @@ -123,4 +123,5 @@ throws_ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-advisor/get_create_table.t b/t/pt-query-advisor/get_create_table.t index 9b8dec7f..9f202e03 100644 --- a/t/pt-query-advisor/get_create_table.t +++ b/t/pt-query-advisor/get_create_table.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $output = ""; @@ -75,4 +75,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-advisor/review.t b/t/pt-query-advisor/review.t index 2e9f84b8..40ce9297 100644 --- a/t/pt-query-advisor/review.t +++ b/t/pt-query-advisor/review.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 4; + plan tests => 5; } my $output = ""; @@ -98,4 +98,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/collect_and_report_cycles.t b/t/pt-query-digest/collect_and_report_cycles.t index fed4eb19..be4a65a9 100644 --- a/t/pt-query-digest/collect_and_report_cycles.t +++ b/t/pt-query-digest/collect_and_report_cycles.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } my $run_with = "$trunk/bin/pt-query-digest --report-format=query_report --limit 10 $trunk/t/lib/samples/slowlogs/"; @@ -67,4 +67,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/daemon.t b/t/pt-query-digest/daemon.t index 3f82df4a..ec8e3b65 100644 --- a/t/pt-query-digest/daemon.t +++ b/t/pt-query-digest/daemon.t @@ -10,7 +10,7 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Time::HiRes qw(sleep); -use Test::More tests => 6; +use Test::More tests => 7; use PerconaTest; use Sandbox; @@ -67,4 +67,5 @@ SKIP: { # Done. # ############################################################################# `rm $pid_file >/dev/null 2>&1`; +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/execute.t b/t/pt-query-digest/execute.t index 3a677a55..21908630 100644 --- a/t/pt-query-digest/execute.t +++ b/t/pt-query-digest/execute.t @@ -30,7 +30,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 5; + plan tests => 6; } my $output = ''; @@ -94,4 +94,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/explain.t b/t/pt-query-digest/explain.t index 5de2b4a6..1c385bcf 100644 --- a/t/pt-query-digest/explain.t +++ b/t/pt-query-digest/explain.t @@ -30,7 +30,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 5; + plan tests => 6; } my $sample = "t/pt-query-digest/samples/"; @@ -118,4 +118,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/explain_partitions.t b/t/pt-query-digest/explain_partitions.t index c9fdbc64..820c6659 100644 --- a/t/pt-query-digest/explain_partitions.t +++ b/t/pt-query-digest/explain_partitions.t @@ -28,7 +28,7 @@ elsif ( !$vp->version_ge($dbh, '5.1.0') ) { plan skip_all => 'Sandbox master version not >= 5.1'; } else { - plan tests => 1; + plan tests => 2; } # ############################################################################# @@ -47,4 +47,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/issue_1186.t b/t/pt-query-digest/issue_1186.t index 05c0f48f..c0adb6e0 100644 --- a/t/pt-query-digest/issue_1186.t +++ b/t/pt-query-digest/issue_1186.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } # ############################################################################# @@ -49,4 +49,5 @@ ok( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/issue_360.t b/t/pt-query-digest/issue_360.t index 54c465af..cf2b5d97 100644 --- a/t/pt-query-digest/issue_360.t +++ b/t/pt-query-digest/issue_360.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } $sb->create_dbs($dbh, ['test']); @@ -54,4 +54,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/mirror.t b/t/pt-query-digest/mirror.t index d208747d..45819ebf 100644 --- a/t/pt-query-digest/mirror.t +++ b/t/pt-query-digest/mirror.t @@ -28,7 +28,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 3; + plan tests => 4; } my $output; @@ -108,4 +108,5 @@ diag(`rm $pid_file 2>/dev/null`); $dbh1->do('set global read_only=0'); $dbh2->do('set global read_only=1'); $sb->wipe_clean($dbh1); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/processlist.t b/t/pt-query-digest/processlist.t index 041c4005..8118c70c 100644 --- a/t/pt-query-digest/processlist.t +++ b/t/pt-query-digest/processlist.t @@ -31,7 +31,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my @args = qw(-F /tmp/12345/my.sandbox.cnf --processlist h=127.1 --report-format query_report); @@ -74,4 +74,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/review.t b/t/pt-query-digest/review.t index 290e2386..d2709fe1 100644 --- a/t/pt-query-digest/review.t +++ b/t/pt-query-digest/review.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 17; + plan tests => 18; } my $run_with = "$trunk/bin/pt-query-digest --report-format=query_report --limit 10 $trunk/t/lib/samples/slowlogs/"; @@ -379,4 +379,5 @@ unlike( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/run_time.t b/t/pt-query-digest/run_time.t index 8a5ef7dc..1ebd9afc 100644 --- a/t/pt-query-digest/run_time.t +++ b/t/pt-query-digest/run_time.t @@ -27,7 +27,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 10; + plan tests => 11; } my @args; @@ -164,4 +164,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/since_until.t b/t/pt-query-digest/since_until.t index 9477479b..f0ec72ae 100644 --- a/t/pt-query-digest/since_until.t +++ b/t/pt-query-digest/since_until.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 9; +use Test::More tests => 10; use PerconaTest; use Sandbox; @@ -86,4 +86,5 @@ SKIP: { # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-query-digest/standard_options.t b/t/pt-query-digest/standard_options.t index dfee1093..7a3982e1 100644 --- a/t/pt-query-digest/standard_options.t +++ b/t/pt-query-digest/standard_options.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -45,4 +45,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-show-grants/all_grants.t b/t/pt-show-grants/all_grants.t index 4da6d291..65dbbc31 100644 --- a/t/pt-show-grants/all_grants.t +++ b/t/pt-show-grants/all_grants.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($dbh); @@ -72,4 +72,5 @@ diag(`/tmp/12345/use -u root -e "DROP USER 'bob'\@'192.168.1.1'"`); # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-show-grants/basics.t b/t/pt-show-grants/basics.t index 8a739739..351a07ce 100644 --- a/t/pt-show-grants/basics.t +++ b/t/pt-show-grants/basics.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 10; + plan tests => 11; } $sb->wipe_clean($dbh); @@ -97,4 +97,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-show-grants/issue_445.t b/t/pt-show-grants/issue_445.t index 64c28ea5..24db4bbc 100644 --- a/t/pt-show-grants/issue_445.t +++ b/t/pt-show-grants/issue_445.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 4; + plan tests => 5; } $sb->wipe_clean($dbh); @@ -69,4 +69,5 @@ is( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-slave-delay/basics.t b/t/pt-slave-delay/basics.t index 610a32a6..c58ce731 100644 --- a/t/pt-slave-delay/basics.t +++ b/t/pt-slave-delay/basics.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 5; + plan tests => 6; } my $output; @@ -88,4 +88,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-slave-delay/standard_options.t b/t/pt-slave-delay/standard_options.t index d5b4e544..c4b22911 100644 --- a/t/pt-slave-delay/standard_options.t +++ b/t/pt-slave-delay/standard_options.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 8; + plan tests => 9; } my $output; @@ -98,4 +98,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-slave-find/pt-slave-find.t b/t/pt-slave-find/pt-slave-find.t index 65f89ea2..61a4577b 100644 --- a/t/pt-slave-find/pt-slave-find.t +++ b/t/pt-slave-find/pt-slave-find.t @@ -33,7 +33,7 @@ elsif ( !$slave_2_dbh ) { plan skip_all => 'Cannot connect to second sandbox slave'; } else { - plan tests => 5; + plan tests => 6; } my @args = ('h=127.0.0.1,P=12345,u=msandbox,p=msandbox'); @@ -110,4 +110,5 @@ is( # Done. # ############################################################################# diag(`rm -rf $outfile >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-slave-restart/pt-slave-restart.t b/t/pt-slave-restart/pt-slave-restart.t index 2cc678d8..f33393c8 100644 --- a/t/pt-slave-restart/pt-slave-restart.t +++ b/t/pt-slave-restart/pt-slave-restart.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 14; + plan tests => 15; } $sb->create_dbs($master_dbh, ['test']); @@ -134,4 +134,5 @@ is( diag(`rm -f /tmp/pt-slave-re*`); $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-stalk/pt-stalk.t b/t/pt-stalk/pt-stalk.t index 83d180d7..1034549d 100644 --- a/t/pt-stalk/pt-stalk.t +++ b/t/pt-stalk/pt-stalk.t @@ -24,7 +24,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 21; + plan tests => 22; } my $cnf = "/tmp/12345/my.sandbox.cnf"; @@ -243,4 +243,5 @@ diag(`cp $ENV{HOME}/.pt-stalk.conf.original $ENV{HOME}/.pt-stalk.conf 2>/dev/nul diag(`rm $pid_file 2>/dev/null`); diag(`rm $log_file 2>/dev/null`); diag(`rm -rf $dest 2>/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/basics.t b/t/pt-table-checksum/basics.t index bba96cad..b9627ef9 100644 --- a/t/pt-table-checksum/basics.t +++ b/t/pt-table-checksum/basics.t @@ -41,7 +41,7 @@ elsif ( !@{$master_dbh->selectall_arrayref('show databases like "sakila"')} ) { plan skip_all => 'sakila database is not loaded'; } else { - plan tests => 32; + plan tests => 33; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -424,4 +424,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/char_chunking.t b/t/pt-table-checksum/char_chunking.t index 9597a74d..1ea45a63 100644 --- a/t/pt-table-checksum/char_chunking.t +++ b/t/pt-table-checksum/char_chunking.t @@ -25,7 +25,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 5; + plan tests => 6; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -83,4 +83,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/chunk_index.t b/t/pt-table-checksum/chunk_index.t index 3aae20f7..d20bf382 100644 --- a/t/pt-table-checksum/chunk_index.t +++ b/t/pt-table-checksum/chunk_index.t @@ -25,7 +25,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 10; + plan tests => 11; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -145,4 +145,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/chunk_size.t b/t/pt-table-checksum/chunk_size.t index 3a23dc97..65d4a224 100644 --- a/t/pt-table-checksum/chunk_size.t +++ b/t/pt-table-checksum/chunk_size.t @@ -26,7 +26,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 7; + plan tests => 8; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -141,4 +141,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/create_replicate_table.t b/t/pt-table-checksum/create_replicate_table.t index 35646805..dbd7431a 100644 --- a/t/pt-table-checksum/create_replicate_table.t +++ b/t/pt-table-checksum/create_replicate_table.t @@ -30,7 +30,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 4; + plan tests => 5; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -130,4 +130,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/error_handling.t b/t/pt-table-checksum/error_handling.t index de8496d9..5334d0a2 100644 --- a/t/pt-table-checksum/error_handling.t +++ b/t/pt-table-checksum/error_handling.t @@ -25,7 +25,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 6; + plan tests => 7; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -117,4 +117,5 @@ $master_dbh = $sb->get_dbh_for('master'); # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/filters.t b/t/pt-table-checksum/filters.t index d8ac8643..5bef8bf0 100644 --- a/t/pt-table-checksum/filters.t +++ b/t/pt-table-checksum/filters.t @@ -27,7 +27,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 8; + plan tests => 9; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -132,4 +132,5 @@ test_filter( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/float_precision.t b/t/pt-table-checksum/float_precision.t index 2d79447c..11e95839 100644 --- a/t/pt-table-checksum/float_precision.t +++ b/t/pt-table-checksum/float_precision.t @@ -25,7 +25,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 6; + plan tests => 7; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -86,4 +86,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/fnv_64.t b/t/pt-table-checksum/fnv_64.t index 1bdd6d0f..3ee9da28 100644 --- a/t/pt-table-checksum/fnv_64.t +++ b/t/pt-table-checksum/fnv_64.t @@ -42,7 +42,7 @@ if ( $EVAL_ERROR ) { plan skip_all => "No FNV_64 UDF lib" } else { - plan tests => 6; + plan tests => 7; } $sb->create_dbs($master_dbh, [qw(test)]); @@ -111,4 +111,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/ignore_columns.t b/t/pt-table-checksum/ignore_columns.t index 8c54ebaa..01d40a2c 100644 --- a/t/pt-table-checksum/ignore_columns.t +++ b/t/pt-table-checksum/ignore_columns.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 3; + plan tests => 4; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -80,4 +80,5 @@ unlike( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/issue_388.t b/t/pt-table-checksum/issue_388.t index 955607dc..b4210160 100644 --- a/t/pt-table-checksum/issue_388.t +++ b/t/pt-table-checksum/issue_388.t @@ -25,7 +25,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -65,4 +65,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/issue_47.t b/t/pt-table-checksum/issue_47.t index 5431c2a4..ca79c270 100644 --- a/t/pt-table-checksum/issue_47.t +++ b/t/pt-table-checksum/issue_47.t @@ -25,7 +25,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -72,4 +72,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/issue_602.t b/t/pt-table-checksum/issue_602.t index 2f67dcc6..ca801e56 100644 --- a/t/pt-table-checksum/issue_602.t +++ b/t/pt-table-checksum/issue_602.t @@ -25,7 +25,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -56,4 +56,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/progress.t b/t/pt-table-checksum/progress.t index d5095742..a08070a8 100644 --- a/t/pt-table-checksum/progress.t +++ b/t/pt-table-checksum/progress.t @@ -39,7 +39,7 @@ elsif ( !$slave2_dbh ) { plan skip_all => 'Cannot connect to sandbox slave2'; } else { - plan tests => 3; + plan tests => 4; } # Must have empty checksums table for these tests. @@ -101,4 +101,5 @@ is( # ############################################################################# $sb->wipe_clean($master_dbh); diag(`$trunk/sandbox/test-env reset >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/replication_filters.t b/t/pt-table-checksum/replication_filters.t index a5408c28..03fc4da3 100644 --- a/t/pt-table-checksum/replication_filters.t +++ b/t/pt-table-checksum/replication_filters.t @@ -41,7 +41,7 @@ elsif ( !$slave2_dbh ) { plan skip_all => 'Cannot connect to sandbox slave2'; } else { - plan tests => 10; + plan tests => 11; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -276,4 +276,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/resume.t b/t/pt-table-checksum/resume.t index f981c46d..9979bcd4 100644 --- a/t/pt-table-checksum/resume.t +++ b/t/pt-table-checksum/resume.t @@ -29,7 +29,7 @@ elsif ( !$slave1_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 47; + plan tests => 48; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -696,4 +696,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/standard_options.t b/t/pt-table-checksum/standard_options.t index 5c63a735..2968da28 100644 --- a/t/pt-table-checksum/standard_options.t +++ b/t/pt-table-checksum/standard_options.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave1'; } else { - plan tests => 5; + plan tests => 6; } # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic @@ -132,4 +132,5 @@ diag(`rm -rf $pid_file >/dev/null 2>&1`); # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-checksum/throttle.t b/t/pt-table-checksum/throttle.t index 8169d884..d081f169 100644 --- a/t/pt-table-checksum/throttle.t +++ b/t/pt-table-checksum/throttle.t @@ -33,7 +33,7 @@ elsif ( !$slave2_dbh ) { plan skip_all => 'Cannot connect to sandbox slave2'; } else { - plan tests => 4; + plan tests => 5; } @@ -98,4 +98,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/basics.t b/t/pt-table-sync/basics.t index e132b02c..a92c7037 100644 --- a/t/pt-table-sync/basics.t +++ b/t/pt-table-sync/basics.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 21; + plan tests => 22; } $sb->wipe_clean($master_dbh); @@ -238,4 +238,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/bidirectional.t b/t/pt-table-sync/bidirectional.t index 6d7bd0de..50b7d951 100644 --- a/t/pt-table-sync/bidirectional.t +++ b/t/pt-table-sync/bidirectional.t @@ -39,7 +39,7 @@ elsif ( !$r1_dbh ) { } else { - plan tests => 22; + plan tests => 23; } my $output; @@ -536,4 +536,5 @@ SKIP: { # ############################################################################# diag(`$trunk/sandbox/stop-sandbox 2900 >/dev/null`); diag(`$trunk/sandbox/stop-sandbox 2901 >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/binlog_format.t b/t/pt-table-sync/binlog_format.t index d6bde2d4..7369f31f 100644 --- a/t/pt-table-sync/binlog_format.t +++ b/t/pt-table-sync/binlog_format.t @@ -32,7 +32,7 @@ elsif ( !$vp->version_ge($master_dbh, '5.1.5') ) { plan skip_all => 'Sandbox master version not >= 5.1'; } else { - plan tests => 6; + plan tests => 7; } $sb->wipe_clean($master_dbh); @@ -109,4 +109,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/char_chunking.t b/t/pt-table-sync/char_chunking.t index 47ab49ab..8b421ecb 100644 --- a/t/pt-table-sync/char_chunking.t +++ b/t/pt-table-sync/char_chunking.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 6; + plan tests => 7; } my $output; @@ -86,4 +86,5 @@ like( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/check_privs.t b/t/pt-table-sync/check_privs.t index dd201e71..dd2f1aa7 100644 --- a/t/pt-table-sync/check_privs.t +++ b/t/pt-table-sync/check_privs.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -87,4 +87,5 @@ $master_dbh->do('DROP USER \'test_907\'@\'localhost\''); # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/columns.t b/t/pt-table-sync/columns.t index 434212cd..d3b867d5 100644 --- a/t/pt-table-sync/columns.t +++ b/t/pt-table-sync/columns.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 5; + plan tests => 6; } $sb->wipe_clean($master_dbh); @@ -78,4 +78,5 @@ EOF # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/filters.t b/t/pt-table-sync/filters.t index f8a3c49e..494c26c8 100644 --- a/t/pt-table-sync/filters.t +++ b/t/pt-table-sync/filters.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 4; + plan tests => 5; } # Previous tests slave 12347 to 12346 which makes pt-table-checksum @@ -109,4 +109,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/float_precision.t b/t/pt-table-sync/float_precision.t index 0afcd0fe..29e96b59 100644 --- a/t/pt-table-sync/float_precision.t +++ b/t/pt-table-sync/float_precision.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -71,4 +71,5 @@ is( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/force_index.t b/t/pt-table-sync/force_index.t index bb6e8562..edb68bcd 100644 --- a/t/pt-table-sync/force_index.t +++ b/t/pt-table-sync/force_index.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -54,4 +54,5 @@ like($output, qr/FROM `test`\.`issue_37` WHERE/, 'No USE INDEX hint with --no-i # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/hex_blob.t b/t/pt-table-sync/hex_blob.t index 77a82db8..3342fdb0 100644 --- a/t/pt-table-sync/hex_blob.t +++ b/t/pt-table-sync/hex_blob.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -63,4 +63,5 @@ unlike( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/instrumentaiton.t b/t/pt-table-sync/instrumentaiton.t index 717aa67c..93f2ddae 100644 --- a/t/pt-table-sync/instrumentaiton.t +++ b/t/pt-table-sync/instrumentaiton.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } my $output = ''; @@ -53,4 +53,5 @@ like( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_1052.t b/t/pt-table-sync/issue_1052.t index 71181cfd..44aa206c 100644 --- a/t/pt-table-sync/issue_1052.t +++ b/t/pt-table-sync/issue_1052.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -66,4 +66,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_1065.t b/t/pt-table-sync/issue_1065.t index 81a7b1f1..32d5b12a 100644 --- a/t/pt-table-sync/issue_1065.t +++ b/t/pt-table-sync/issue_1065.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -51,4 +51,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_218.t b/t/pt-table-sync/issue_218.t index ca7c3941..dd6b9132 100644 --- a/t/pt-table-sync/issue_218.t +++ b/t/pt-table-sync/issue_218.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -48,4 +48,5 @@ ok(!$?, 'Issue 218: NULL values compare as equal'); # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_22.t b/t/pt-table-sync/issue_22.t index daafac3a..b68ef8fe 100644 --- a/t/pt-table-sync/issue_22.t +++ b/t/pt-table-sync/issue_22.t @@ -24,7 +24,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } $sb->wipe_clean($master_dbh); @@ -55,4 +55,5 @@ is($output, $output2, 'test2.messages matches test.messages (issue 22)'); # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_262.t b/t/pt-table-sync/issue_262.t index cf21aede..a19e9646 100644 --- a/t/pt-table-sync/issue_262.t +++ b/t/pt-table-sync/issue_262.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -54,4 +54,5 @@ like( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_408.t b/t/pt-table-sync/issue_408.t index f7964d02..bcf00eba 100644 --- a/t/pt-table-sync/issue_408.t +++ b/t/pt-table-sync/issue_408.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -57,4 +57,5 @@ like( $sb->wipe_clean($master_dbh); diag(`/tmp/12348/stop >/dev/null`); diag(`rm -rf /tmp/12348 >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_560.t b/t/pt-table-sync/issue_560.t index 77f3f674..59f77282 100644 --- a/t/pt-table-sync/issue_560.t +++ b/t/pt-table-sync/issue_560.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -72,4 +72,5 @@ ok( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_616.t b/t/pt-table-sync/issue_616.t index b3fefe6c..790b5c48 100644 --- a/t/pt-table-sync/issue_616.t +++ b/t/pt-table-sync/issue_616.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -69,4 +69,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_627.t b/t/pt-table-sync/issue_627.t index cd2ba9e4..1a572aac 100644 --- a/t/pt-table-sync/issue_627.t +++ b/t/pt-table-sync/issue_627.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -71,4 +71,5 @@ REPLACE INTO `issue_375`.`t`(`id`, `updated_at`, `foo`) VALUES ('100', '2009-09- # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_631.t b/t/pt-table-sync/issue_631.t index ce175fc8..a0beec98 100644 --- a/t/pt-table-sync/issue_631.t +++ b/t/pt-table-sync/issue_631.t @@ -24,7 +24,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -67,4 +67,5 @@ ok( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_634.t b/t/pt-table-sync/issue_634.t index d7f9a211..04ac8037 100644 --- a/t/pt-table-sync/issue_634.t +++ b/t/pt-table-sync/issue_634.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -57,4 +57,5 @@ is_deeply( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_644.t b/t/pt-table-sync/issue_644.t index 1bc65da8..a3cd23b2 100644 --- a/t/pt-table-sync/issue_644.t +++ b/t/pt-table-sync/issue_644.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -68,4 +68,5 @@ ok( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_79.t b/t/pt-table-sync/issue_79.t index c2d568d3..9657594e 100644 --- a/t/pt-table-sync/issue_79.t +++ b/t/pt-table-sync/issue_79.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 6; + plan tests => 7; } $sb->wipe_clean($master_dbh); @@ -82,4 +82,5 @@ like($output, qr/test2/, '--replicate honors --tables (4/4)'); # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_804.t b/t/pt-table-sync/issue_804.t index ff5ad4e4..0db264d8 100644 --- a/t/pt-table-sync/issue_804.t +++ b/t/pt-table-sync/issue_804.t @@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -55,4 +55,5 @@ is( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_920.t b/t/pt-table-sync/issue_920.t index e7b4e065..9a2c167c 100644 --- a/t/pt-table-sync/issue_920.t +++ b/t/pt-table-sync/issue_920.t @@ -25,7 +25,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 3; + plan tests => 4; } # ############################################################################# @@ -68,4 +68,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_96.t b/t/pt-table-sync/issue_96.t index 6798bb8a..8786f8d0 100644 --- a/t/pt-table-sync/issue_96.t +++ b/t/pt-table-sync/issue_96.t @@ -24,7 +24,7 @@ if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -50,4 +50,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_965.t b/t/pt-table-sync/issue_965.t index 418b8beb..e387e2fa 100644 --- a/t/pt-table-sync/issue_965.t +++ b/t/pt-table-sync/issue_965.t @@ -23,7 +23,7 @@ if ( !$dbh ) { plan skip_all => 'Cannot connect to sandbox master'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -60,4 +60,5 @@ is_deeply( # Done. # ############################################################################# $sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/issue_996.t b/t/pt-table-sync/issue_996.t index 41310042..8d6b6671 100644 --- a/t/pt-table-sync/issue_996.t +++ b/t/pt-table-sync/issue_996.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -105,4 +105,5 @@ diag(`rm -rf $file >/dev/null`); # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/lock_and_rename.t b/t/pt-table-sync/lock_and_rename.t index 0eaa2b97..f2f3aaa5 100644 --- a/t/pt-table-sync/lock_and_rename.t +++ b/t/pt-table-sync/lock_and_rename.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -60,4 +60,5 @@ like($output, qr/COMMENT='test1'/, '--lock-and-rename worked'); # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/lock_level.t b/t/pt-table-sync/lock_level.t index b08f273f..b4e4d40b 100644 --- a/t/pt-table-sync/lock_level.t +++ b/t/pt-table-sync/lock_level.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 1; + plan tests => 2; } $sb->wipe_clean($master_dbh); @@ -51,4 +51,5 @@ unlike( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/replicate_do_db.t b/t/pt-table-sync/replicate_do_db.t index 6bdf9730..05595cee 100644 --- a/t/pt-table-sync/replicate_do_db.t +++ b/t/pt-table-sync/replicate_do_db.t @@ -40,7 +40,7 @@ elsif ( !$dbh3 ) { plan skip_all => 'Cannot connect to second sandbox slave'; } else { - plan tests => 4; + plan tests => 5; } $sb->wipe_clean($master_dbh); @@ -127,4 +127,5 @@ diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`); # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/specify_column_or_index.t b/t/pt-table-sync/specify_column_or_index.t index 74195de7..42b4b51e 100644 --- a/t/pt-table-sync/specify_column_or_index.t +++ b/t/pt-table-sync/specify_column_or_index.t @@ -29,7 +29,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -59,4 +59,5 @@ like( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/sync_to_differnt_db.t b/t/pt-table-sync/sync_to_differnt_db.t index f7b5b5a9..7cdd1da9 100644 --- a/t/pt-table-sync/sync_to_differnt_db.t +++ b/t/pt-table-sync/sync_to_differnt_db.t @@ -31,7 +31,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 2; + plan tests => 3; } $sb->wipe_clean($master_dbh); @@ -66,4 +66,5 @@ is( # ############################################################################# $sb->wipe_clean($master_dbh); diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/traces.t b/t/pt-table-sync/traces.t index 02cac37c..4d47f6d6 100644 --- a/t/pt-table-sync/traces.t +++ b/t/pt-table-sync/traces.t @@ -33,7 +33,7 @@ elsif ( !$mysqlbinlog ) { plan skip_all => 'Cannot find mysqlbinlog'; } else { - plan tests => 1; + plan tests => 2; } my $output; @@ -65,4 +65,5 @@ is( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/triggers.t b/t/pt-table-sync/triggers.t index 6c91f306..e3750eeb 100644 --- a/t/pt-table-sync/triggers.t +++ b/t/pt-table-sync/triggers.t @@ -32,7 +32,7 @@ elsif ( !$vp->version_ge($master_dbh, '5.0.2') ) { plan skip_all => 'Sever does not support triggers (< 5.0.2)'; } else { - plan tests => 10; + plan tests => 11; } $sb->wipe_clean($master_dbh); @@ -147,4 +147,5 @@ is( # ############################################################################# $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/wait.t b/t/pt-table-sync/wait.t index d01a867c..e04cd288 100644 --- a/t/pt-table-sync/wait.t +++ b/t/pt-table-sync/wait.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 4; + plan tests => 5; } my $output; @@ -129,4 +129,5 @@ cmp_ok( kill 15, $pid; waitpid ($pid, 0); $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-table-sync/zero_chunk.t b/t/pt-table-sync/zero_chunk.t index 88fcc619..1beb2418 100644 --- a/t/pt-table-sync/zero_chunk.t +++ b/t/pt-table-sync/zero_chunk.t @@ -27,7 +27,7 @@ elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } else { - plan tests => 2; + plan tests => 3; } my $output; @@ -55,4 +55,5 @@ unlike( # Done. # ############################################################################# $sb->wipe_clean($master_dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-upgrade/basics.t b/t/pt-upgrade/basics.t index 6d5c56b2..5190d119 100644 --- a/t/pt-upgrade/basics.t +++ b/t/pt-upgrade/basics.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 10; + plan tests => 11; } $sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql'); @@ -142,4 +142,5 @@ is_deeply( diag(`rm /tmp/left-outfile.txt /tmp/right-outfile.txt 2>/dev/null`); $sb->wipe_clean($dbh1); $sb->wipe_clean($dbh2); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-upgrade/daemon.t b/t/pt-upgrade/daemon.t index ca7555f8..13859d72 100644 --- a/t/pt-upgrade/daemon.t +++ b/t/pt-upgrade/daemon.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 1; + plan tests => 2; } my $cmd = "$trunk/bin/pt-upgrade h=127.1,P=12345,u=msandbox,p=msandbox P=12347 --compare results,warnings --zero-query-times"; @@ -48,4 +48,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-upgrade/rewrite_non_select.t b/t/pt-upgrade/rewrite_non_select.t index 2a450cbf..01408b55 100644 --- a/t/pt-upgrade/rewrite_non_select.t +++ b/t/pt-upgrade/rewrite_non_select.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 4; + plan tests => 5; } $sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql'); @@ -71,4 +71,5 @@ ok( $sb->wipe_clean($dbh1); $sb->wipe_clean($dbh2); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-upgrade/skip_non_select.t b/t/pt-upgrade/skip_non_select.t index 15f04ec6..efaa5906 100644 --- a/t/pt-upgrade/skip_non_select.t +++ b/t/pt-upgrade/skip_non_select.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 1; + plan tests => 2; } $sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql'); @@ -52,4 +52,5 @@ ok( # ############################################################################# $sb->wipe_clean($dbh1); $sb->wipe_clean($dbh2); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-upgrade/warnings.t b/t/pt-upgrade/warnings.t index 50c09141..d9dd1f34 100644 --- a/t/pt-upgrade/warnings.t +++ b/t/pt-upgrade/warnings.t @@ -30,7 +30,7 @@ elsif ( !$dbh2 ) { plan skip_all => 'Cannot connect to second sandbox master'; } else { - plan tests => 5; + plan tests => 6; } $sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql'); @@ -95,4 +95,5 @@ ok( # ############################################################################# $sb->wipe_clean($dbh1); $sb->wipe_clean($dbh2); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit; diff --git a/t/pt-variable-advisor/show_variables_online.t b/t/pt-variable-advisor/show_variables_online.t index 813d202f..a0bf1303 100644 --- a/t/pt-variable-advisor/show_variables_online.t +++ b/t/pt-variable-advisor/show_variables_online.t @@ -26,7 +26,7 @@ if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; } else { - plan tests => 2; + plan tests => 3; } # ############################################################################# @@ -56,4 +56,5 @@ like( # ############################################################################# # Done. # ############################################################################# +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); exit;