Files
MaxScale/maxscale-system-test/mysqlmon_failover_auto.cpp
Esa Korhonen 96ba2da40c MXS-2900 Move testcore library files to a dedicated directory
The library is now named "maxtest". The related include-files are, for
now, usable without designating the full include path. This may be changed
later, but would require modifying every test.
2020-03-02 11:17:30 +02:00

55 lines
1.2 KiB
C++

/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2024-02-10
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "mariadb_nodes.h"
#include "failover_common.cpp"
int main(int argc, char** argv)
{
Mariadb_nodes::require_gtid(true);
TestConnections test(argc, argv);
test.repl->connect();
delete_slave_binlogs(test);
test.maxscales->wait_for_monitor(2);
basic_test(test);
print_gtids(test);
// Part 1
int node0_id = prepare_test_1(test);
test.maxscales->wait_for_monitor(2);
check_test_1(test, node0_id);
if (test.global_result != 0)
{
return test.global_result;
}
// Part 2
prepare_test_2(test);
test.maxscales->wait_for_monitor(2);
check_test_2(test);
if (test.global_result != 0)
{
return test.global_result;
}
// Part 3
prepare_test_3(test);
test.maxscales->wait_for_monitor(2);
check_test_3(test);
return test.global_result;
}