Fix mysqlmon_failover_auto and mysqlmon_failover_manual

The tests now reset the replication state using queries and switchover instead of
calling fix_replication(). The results are checked so these tests now test
switchover as well.

Also, reduce printing when verbose is on for any test using the get_output()-function
in fail_switch_rejoin_common.cpp.
This commit is contained in:
Esa Korhonen
2017-12-20 11:19:17 +02:00
parent 8ef681d8cd
commit 6b2133d6a6
6 changed files with 219 additions and 71 deletions

View File

@ -1,5 +1,14 @@
/**
* Test auto_failover
/*
* 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: 2020-01-01
*
* 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 "testconnections.h"
@ -7,29 +16,39 @@
int main(int argc, char** argv)
{
interactive = strcmp(argv[argc - 1], "interactive") == 0;
Mariadb_nodes::require_gtid(true);
TestConnections test(argc, argv);
test.repl->connect();
delete_slave_binlogs(test);
// Wait a few seconds
sleep(5);
sleep(2);
basic_test(test);
print_gtids(test);
// Test 1
// Part 1
int node0_id = prepare_test_1(test);
sleep(10);
check_test_1(test, node0_id);
// Test 2
if (test.global_result != 0)
{
return test.global_result;
}
// Part 2
prepare_test_2(test);
sleep(10);
check_test_2(test);
// Test 3
if (test.global_result != 0)
{
return test.global_result;
}
// Part 3
prepare_test_3(test);
sleep(10);
check_test_3(test);
test.repl->fix_replication();
return test.global_result;
}