Add tests with big backend

Basic tests can be executed with 15 machines Master/slave backend. Tests have label BIG_REPL_BACKEND Default template modified to support big backend. Tests temporaraly labeled as UNSTABLE to prevent their execution nightly
For big test maxscale.cnf is automatically generated for any number of nodes
This commit is contained in:
Timofey Turenko
2019-04-18 09:48:39 +03:00
parent 802a19879b
commit ddf9002e86
16 changed files with 215 additions and 176 deletions

View File

@ -51,6 +51,15 @@ Mariadb_nodes::Mariadb_nodes(const char *pref, const char *test_cwd, bool verbos
truncate_mariadb_logs();
flush_hosts();
close_active_connections();
cnf_server_name = std::string(prefix);
if (strcmp(prefix, "node") == 0)
{
cnf_server_name = std::string("server");
}
if (strcmp(prefix, "galera") == 0)
{
cnf_server_name = std::string("gserver");
}
}
Mariadb_nodes::~Mariadb_nodes()
@ -1453,3 +1462,32 @@ void Mariadb_nodes::limit_nodes(int new_N)
sleep(10);
}
}
std::string Mariadb_nodes::cnf_servers()
{
std::string s;
for (int i = 0; i < N; i++)
{
s += std::string("\\n[") +
cnf_server_name +
std::to_string(i + 1) +
std::string("]\\ntype=server\\naddress=") +
std::string(IP[i]) +
std::string("\\nport=") +
std::to_string(port[i]) +
std::string("\\nprotocol=MySQLBackend\\n");
}
return s;
}
std::string Mariadb_nodes::cnf_servers_line()
{
std::string s = cnf_server_name + std::to_string(1);
for (int i = 1; i < N; i++)
{
s += std::string(",") +
cnf_server_name +
std::to_string(i + 1);
}
return s;
}