Rewrite binlog_change_master tests

The tests were consistently unstable and as a result of this did not
provide any actionable output. In addition to this these two test were the
longest running tests in the whole MaxScale test suite so a re-design was
warranted.

Instead of emulating a client and a server failure, testing functionality
provides for a test that is faster, more precise and provides more
actionable output. Due to the single-threadedness of the new test, no
cross-thread depencies are present. In addition to this, the superfluous
log flushing was not done as it almost always happened after all
transactions were already complete.

The estimated savings in test time alone is around 1100 seconds (roughly
18 minutes).
This commit is contained in:
Markus Mäkelä
2018-11-01 23:51:39 +02:00
parent b77d5568d8
commit c523bf74b8
4 changed files with 96 additions and 388 deletions

View File

@ -0,0 +1,25 @@
/**
* The GTID version of binlog_change_master
*/
#include "testconnections.h"
#include "binlog_change_master_common.cpp"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.binlog_master_gtid = true;
test.binlog_slave_gtid = true;
auto cb = [&](MYSQL* blr) {
test.try_query(blr, "STOP SLAVE");
test.try_query(blr, "CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d,"
"MASTER_USE_GTID=SLAVE_POS",
test.repl->IP[2], test.repl->port[2]);
test.try_query(blr, "START SLAVE");
};
run_test(test, cb);
return test.global_result;
}