diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_2 b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_2 index 97a68b710..72c5c1159 100644 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_2 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_2 @@ -9,6 +9,7 @@ user=maxskysql passwd= skysql monitor_interval=1000 allow_cluster_recovery=true +detect_standalone_master=true auto_failover=false replication_user=repl replication_password=repl diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_3 b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_3 index 3f7262bf0..cab5af09e 100644 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_3 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_3 @@ -9,6 +9,7 @@ user=maxskysql passwd= skysql monitor_interval=1000 allow_cluster_recovery=true +detect_standalone_master=true auto_failover=false replication_user=repl replication_password=repl diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_4 b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_4 index 2c7374b42..d82b48ad8 100644 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_4 +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mysqlmon_failover_manual2_4 @@ -9,6 +9,8 @@ user=maxskysql passwd= skysql monitor_interval=1000 allow_cluster_recovery=true +detect_standalone_master=true +auto_failover=false replication_user=repl replication_password=repl backend_connect_timeout=1 diff --git a/maxscale-system-test/mysqlmon_failover_manual2.cpp b/maxscale-system-test/mysqlmon_failover_manual2.cpp index e5cfa5f9a..d9a146092 100644 --- a/maxscale-system-test/mysqlmon_failover_manual2.cpp +++ b/maxscale-system-test/mysqlmon_failover_manual2.cpp @@ -132,47 +132,51 @@ void run(TestConnections& test) { sleep(5); - cout << "Connecting to MaxScale." << endl; + cout << "\nConnecting to MaxScale." << endl; x::connect_maxscale(test); - cout << "Creating table." << endl; + cout << "\nCreating table." << endl; create_table(test); - cout << "Inserting data." << endl; + cout << "\nInserting data." << endl; insert_data(test); list_servers(test); - cout << "Syncing slaves." << endl; + cout << "\nSyncing slaves." << endl; test.repl->sync_slaves(); - cout << "Stopping master." << endl; + cout << "\nStopping master." << endl; x::stop_node(*test.repl, 0); list_servers(test); - cout << "Should fail as master is no longer available, but trying to insert data... " << endl; + cout << "\nShould fail as master is no longer available, but trying to insert data... " << endl; x::fail(insert_data, test); cout << "Failed as expected." << endl; list_servers(test); - cout << "Performing failover... " << endl; + cout << "\nPerforming failover... " << endl; test.maxscales->execute_maxadmin_command_print(0, (char*)"call command mysqlmon failover MySQL-Monitor"); list_servers(test); - cout << "Should still fail as there is not transparent master failover, " + cout << "\nShould still fail as there is not transparent master failover, " << "but trying to insert data... " << endl; x::fail(insert_data, test); cout << "Failed as expected." << endl; - cout << "Closing connection to MaxScale." << endl; + cout << "\nClosing connection to MaxScale." << endl; test.maxscales->close_maxscale_connections(0); - cout << "Connecting to MaxScale." << endl; + sleep(5); + + cout << "\nConnecting to MaxScale." << endl; x::connect_maxscale(test); + list_servers(test); + cout << "Trying to insert data... " << flush; insert_data(test); cout << "succeeded." << endl;