Remove implicit initialization of all maxscales
The extra maxscale instances are only started if the test explicitly requests it.
This commit is contained in:
@ -22,6 +22,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
char * version;
|
char * version;
|
||||||
|
|
||||||
|
TestConnections::multiple_maxscales(true);
|
||||||
TestConnections * Test = new TestConnections(argc, argv);
|
TestConnections * Test = new TestConnections(argc, argv);
|
||||||
Test->set_timeout(10);
|
Test->set_timeout(10);
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ int main(int argc, char *argv[])
|
|||||||
bool passive;
|
bool passive;
|
||||||
char str[1024];
|
char str[1024];
|
||||||
|
|
||||||
|
TestConnections::multiple_maxscales(true);
|
||||||
TestConnections * Test = new TestConnections(argc, argv);
|
TestConnections * Test = new TestConnections(argc, argv);
|
||||||
//Test->set_timeout(10);
|
//Test->set_timeout(10);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ static bool check_nodes = true;
|
|||||||
static bool manual_debug = false;
|
static bool manual_debug = false;
|
||||||
static std::string required_repl_version;
|
static std::string required_repl_version;
|
||||||
static std::string required_galera_version;
|
static std::string required_galera_version;
|
||||||
|
static bool multiple_maxscales = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void signal_set(int sig, void (*handler)(int))
|
static void signal_set(int sig, void (*handler)(int))
|
||||||
@ -55,6 +56,11 @@ void TestConnections::skip_maxscale_start(bool value)
|
|||||||
maxscale::start = !value;
|
maxscale::start = !value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestConnections::multiple_maxscales(bool value)
|
||||||
|
{
|
||||||
|
maxscale::multiple_maxscales = value;
|
||||||
|
}
|
||||||
|
|
||||||
void TestConnections::require_repl_version(const char *version)
|
void TestConnections::require_repl_version(const char *version)
|
||||||
{
|
{
|
||||||
maxscale::required_repl_version = version;
|
maxscale::required_repl_version = version;
|
||||||
@ -648,10 +654,16 @@ void TestConnections::process_template(int m, const char *template_name, const c
|
|||||||
|
|
||||||
void TestConnections::init_maxscales()
|
void TestConnections::init_maxscales()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < maxscales->N; i++)
|
// Always initialize the first MaxScale
|
||||||
|
init_maxscale(0);
|
||||||
|
|
||||||
|
if (maxscale::multiple_maxscales)
|
||||||
|
{
|
||||||
|
for (int i = 1; i < maxscales->N; i++)
|
||||||
{
|
{
|
||||||
init_maxscale(i);
|
init_maxscale(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestConnections::init_maxscale(int m)
|
void TestConnections::init_maxscale(int m)
|
||||||
|
@ -240,6 +240,9 @@ public:
|
|||||||
/** Skip initial start of MaxScale */
|
/** Skip initial start of MaxScale */
|
||||||
static void skip_maxscale_start(bool value);
|
static void skip_maxscale_start(bool value);
|
||||||
|
|
||||||
|
/** Prepare multiple maxscale instances */
|
||||||
|
static void multiple_maxscales(bool value);
|
||||||
|
|
||||||
/** Test requires a certain backend version */
|
/** Test requires a certain backend version */
|
||||||
static void require_repl_version(const char *version);
|
static void require_repl_version(const char *version);
|
||||||
static void require_galera_version(const char *version);
|
static void require_galera_version(const char *version);
|
||||||
|
Reference in New Issue
Block a user