Remove implicit initialization of all maxscales
The extra maxscale instances are only started if the test explicitly requests it.
This commit is contained in:
@ -21,6 +21,7 @@ static bool check_nodes = true;
|
||||
static bool manual_debug = false;
|
||||
static std::string required_repl_version;
|
||||
static std::string required_galera_version;
|
||||
static bool multiple_maxscales = false;
|
||||
}
|
||||
|
||||
static void signal_set(int sig, void (*handler)(int))
|
||||
@ -55,6 +56,11 @@ void TestConnections::skip_maxscale_start(bool value)
|
||||
maxscale::start = !value;
|
||||
}
|
||||
|
||||
void TestConnections::multiple_maxscales(bool value)
|
||||
{
|
||||
maxscale::multiple_maxscales = value;
|
||||
}
|
||||
|
||||
void TestConnections::require_repl_version(const char *version)
|
||||
{
|
||||
maxscale::required_repl_version = version;
|
||||
@ -648,9 +654,15 @@ void TestConnections::process_template(int m, const char *template_name, const c
|
||||
|
||||
void TestConnections::init_maxscales()
|
||||
{
|
||||
for (int i = 0; i < maxscales->N; i++)
|
||||
// Always initialize the first MaxScale
|
||||
init_maxscale(0);
|
||||
|
||||
if (maxscale::multiple_maxscales)
|
||||
{
|
||||
init_maxscale(i);
|
||||
for (int i = 1; i < maxscales->N; i++)
|
||||
{
|
||||
init_maxscale(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user