MXS-1514: Split failover test in two files, add manual version
The same test now has two versions. In the automatic version failover begins automatically. In the manual version failover is started with maxadmin. The tests are otherwise identical.
This commit is contained in:
34
maxscale-system-test/mysqlmon_failover_auto.cpp
Normal file
34
maxscale-system-test/mysqlmon_failover_auto.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Test auto_failover
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
#include "mysqlmon_failover_common.cpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
interactive = strcmp(argv[argc - 1], "interactive") == 0;
|
||||
TestConnections test(argc, argv);
|
||||
|
||||
// Wait a few seconds
|
||||
sleep(5);
|
||||
basic_test(test);
|
||||
|
||||
// Test 1
|
||||
int node0_id = prepare_test_1(test);
|
||||
sleep(10);
|
||||
check_test_1(test, node0_id);
|
||||
|
||||
// Test 2
|
||||
prepare_test_2(test);
|
||||
sleep(10);
|
||||
check_test_2(test);
|
||||
|
||||
// Test 3
|
||||
prepare_test_3(test);
|
||||
sleep(10);
|
||||
check_test_3(test);
|
||||
|
||||
test.repl->fix_replication();
|
||||
return test.global_result;
|
||||
}
|
Reference in New Issue
Block a user