MXS-1743: Add test case
Added test case that reproduces the problem.
This commit is contained in:
@ -621,6 +621,10 @@ add_test_executable(mxs1713_lots_of_databases.cpp mxs1713_lots_of_databases mxs1
|
||||
# https://jira.mariadb.org/browse/MXS-1731
|
||||
add_test_executable(mxs1731_old_persisted_config.cpp mxs1731_old_persisted_config replication LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1743: Maxscale unable to enforce round-robin between read service for Slave
|
||||
# https://jira.mariadb.org/browse/MXS-1743
|
||||
add_test_executable(mxs1743_rconn_bitmask.cpp mxs1743_rconn_bitmask mxs1743_rconn_bitmask LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1751: Maxscale crashes when certain config is in play (with nodes down)
|
||||
# https://jira.mariadb.org/browse/MXS-1751
|
||||
add_test_executable(mxs1751_available_when_donor_crash.cpp mxs1751_available_when_donor_crash mxs1751_available_when_donor_crash LABELS GALERA_BACKEND)
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
[maxscale]
|
||||
threads=###threads###
|
||||
|
||||
[MySQL Monitor]
|
||||
type=monitor
|
||||
module=mysqlmon
|
||||
###repl51###
|
||||
servers=server1,server2
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
monitor_interval=1000
|
||||
|
||||
[Read Connection Router Master]
|
||||
type=service
|
||||
router=readconnroute
|
||||
router_options=master,slave
|
||||
servers=server1,server2
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
|
||||
[Read Connection Listener Master]
|
||||
type=listener
|
||||
service=Read Connection Router Master
|
||||
protocol=MySQLClient
|
||||
port=4008
|
||||
|
||||
[CLI]
|
||||
type=service
|
||||
router=cli
|
||||
|
||||
[CLI Listener]
|
||||
type=listener
|
||||
service=CLI
|
||||
protocol=maxscaled
|
||||
socket=default
|
||||
|
||||
[server1]
|
||||
type=server
|
||||
address=###node_server_IP_1###
|
||||
port=###node_server_port_1###
|
||||
protocol=MySQLBackend
|
||||
|
||||
[server2]
|
||||
type=server
|
||||
address=###node_server_IP_2###
|
||||
port=###node_server_port_2###
|
||||
protocol=MySQLBackend
|
||||
36
maxscale-system-test/mxs1743_rconn_bitmask.cpp
Normal file
36
maxscale-system-test/mxs1743_rconn_bitmask.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* MXS-1743: Maxscale unable to enforce round-robin between read service for Slave
|
||||
*
|
||||
* https://jira.mariadb.org/browse/MXS-1743
|
||||
*/
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
|
||||
|
||||
test.tprintf("Testing with both master and slave up");
|
||||
test.maxscales->connect();
|
||||
test.try_query(test.maxscales->conn_master[0], "SELECT 1");
|
||||
test.maxscales->disconnect();
|
||||
|
||||
test.tprintf("Testing with only the master");
|
||||
test.repl->block_node(0);
|
||||
sleep(5);
|
||||
test.maxscales->connect();
|
||||
test.try_query(test.maxscales->conn_master[0], "SELECT 1");
|
||||
test.maxscales->disconnect();
|
||||
test.repl->unblock_node(0);
|
||||
sleep(5);
|
||||
|
||||
test.tprintf("Testing with only the slave");
|
||||
test.repl->block_node(1);
|
||||
sleep(5);
|
||||
test.maxscales->connect();
|
||||
test.try_query(test.maxscales->conn_master[0], "SELECT 1");
|
||||
test.maxscales->disconnect();
|
||||
test.repl->unblock_node(1);
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
Reference in New Issue
Block a user