Rename TestConnections::assert() to TestConnections::expect()

Allows the including of <assert.h>.
This commit is contained in:
Johan Wikman
2018-09-10 10:24:46 +03:00
parent bcacdf9358
commit 6279ab350c
38 changed files with 117 additions and 117 deletions

View File

@ -51,7 +51,7 @@ int main(int argc, char** argv)
int master_id = get_master_server_id(test);
cout << "Master server id is " << master_id << endl;
const bool failover_ok = (master_id > 0 && master_id != old_master_id);
test.assert(failover_ok, "Master did not change or no master detected.");
test.expect(failover_ok, "Master did not change or no master detected.");
string gtid_final;
if (failover_ok)
{
@ -82,7 +82,7 @@ int main(int argc, char** argv)
cout << LINE << "\n";
print_gtids(test);
cout << LINE << "\n";
test.assert(gtid_final == gtid_old_master, "Old master did not successfully rejoin the cluster (%s != %s).", gtid_final.c_str(), gtid_old_master.c_str());
test.expect(gtid_final == gtid_old_master, "Old master did not successfully rejoin the cluster (%s != %s).", gtid_final.c_str(), gtid_old_master.c_str());
// Switch master back to server1 so last check is faster
int ec;
test.maxscales->ssh_node_output(0, "maxadmin call command mysqlmon switchover "
@ -90,7 +90,7 @@ int main(int argc, char** argv)
test.maxscales->wait_for_monitor(); // Wait for monitor to update status
get_output(test);
master_id = get_master_server_id(test);
test.assert(master_id == old_master_id, "Switchover back to server1 failed.");
test.expect(master_id == old_master_id, "Switchover back to server1 failed.");
}
else
{