From 0cb72937cd672a6473cde314227d1314530c968f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 5 Oct 2017 08:09:58 +0300 Subject: [PATCH] Disable multi-MaxScale initialization by default Only tests that require multiple MaxScale instances should enable the multi-MaxScale mode. --- maxscale-system-test/testconnections.cpp | 8 +++++++- maxscale-system-test/testconnections.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index 0cec09b9f..c3843f71e 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -16,6 +16,7 @@ namespace maxscale { static bool start = true; static bool check_nodes = true; +static bool multiple_maxscales = false; static std::string required_repl_version; static std::string required_galera_version; } @@ -62,6 +63,11 @@ void TestConnections::require_galera_version(const char *version) maxscale::required_galera_version = version; } +void TestConnections::multiple_maxscales(bool value) +{ + maxscale::multiple_maxscales = value; +} + TestConnections::TestConnections(int argc, char *argv[]): enable_timeouts(true), global_result(0), @@ -285,7 +291,7 @@ TestConnections::TestConnections(int argc, char *argv[]): { init_maxscale(); - if (!secondary_maxscale_IP.empty()) + if (maxscale::multiple_maxscales && !secondary_maxscale_IP.empty()) { set_active_maxscale(MXS_SECONDARY); init_maxscale(); diff --git a/maxscale-system-test/testconnections.h b/maxscale-system-test/testconnections.h index 9bd036489..72cbcdfa6 100644 --- a/maxscale-system-test/testconnections.h +++ b/maxscale-system-test/testconnections.h @@ -337,6 +337,9 @@ public: static void require_repl_version(const char *version); static void require_galera_version(const char *version); + /** Initialize multiple MaxScale instances */ + void multiple_maxscales(bool value); + /** * @brief add_result adds result to global_result and prints error message if result is not 0 * @param result 0 if step PASSED