mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#17574 Detect cluster start failure and "fail" ndb_* tests
mysql-test/lib/mtr_cases.pl: Always set "ndb_test" if tets name contains ndb. Set to skipped if "--skip-ndbcluster" mysql-test/lib/mtr_report.pl: Print special error message for ndb_test that are failed due to failure to start or install ndbcluster mysql-test/mysql-test-run.pl: Remove mtr_error call from ndbcluster_install, instead check after ndbcluster_install if test run should continue or if it should be aborted Faile ndb test and print special error message if it's a ndb test and flag_ndb_status_ok is not ok
This commit is contained in:
@ -1396,7 +1396,6 @@ sub ndbcluster_install () {
|
||||
"--initial"],
|
||||
"", "", "", "") )
|
||||
{
|
||||
mtr_error("Error ndbcluster_install");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1603,9 +1602,19 @@ sub mysql_install_db () {
|
||||
|
||||
if ( ndbcluster_install() )
|
||||
{
|
||||
# failed to install, disable usage but flag that its no ok
|
||||
$opt_with_ndbcluster= 0;
|
||||
$flag_ndb_status_ok= 0;
|
||||
if ( $opt_force)
|
||||
{
|
||||
# failed to install, disable usage and flag that its no ok
|
||||
mtr_report("ndbcluster_install failed, continuing without cluster");
|
||||
$opt_with_ndbcluster= 0;
|
||||
$flag_ndb_status_ok= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Aborting: Failed to install ndb cluster\n";
|
||||
print "To continue, re-run with '--force'.\n";
|
||||
mtr_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1805,6 +1814,13 @@ sub run_testcase ($) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $tinfo->{'ndb_test'} and ! $flag_ndb_status_ok )
|
||||
{
|
||||
mtr_report_test_name($tinfo);
|
||||
mtr_report_test_failed($tinfo);
|
||||
return;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# If not using a running servers we may need to stop and restart.
|
||||
# We restart in the case we have initiation scripts, server options
|
||||
|
Reference in New Issue
Block a user