Files
MaxScale/system-test/mxs2563_concurrent_slave_failure.cpp
Esa Korhonen 08f5174915 MXS-2900 Rename maxscale-system-test directory to system-test
A link with the old directory name is provided.
2020-07-28 15:24:27 +03:00

36 lines
869 B
C++

/**
* MXS-2563: Failing debug assertion at rwsplitsession.cc:1129 : m_expected_responses == 0
* https://jira.mariadb.org/browse/MXS-2563
*/
#include "testconnections.h"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.maxctrl("alter monitor MariaDB-Monitor monitor_interval 99999");
auto conn = test.maxscales->rwsplit();
conn.connect();
conn.query("SET @a = (SELECT SLEEP(1))");
std::thread thr(
[&test]() {
sleep(5);
test.repl->stop_node(2);
test.repl->stop_node(3);
sleep(5);
test.repl->start_node(2);
test.repl->start_node(3);
});
// Should go to server2
conn.query("SELECT SLEEP(20)");
thr.join();
test.maxctrl("alter monitor MariaDB-Monitor monitor_interval 1000");
return test.global_result;
}