Avoid using test.repl->N in MariaDBMonitor tests

The value may not match the nodes used by the test.
This commit is contained in:
Esa Korhonen
2020-11-24 10:42:52 +02:00
parent abd1efefc6
commit 885077b4d0
11 changed files with 20 additions and 19 deletions

View File

@ -34,6 +34,9 @@ const time_t FAILOVER_DURATION = 5;
// The test now runs only two failovers. Change for a longer time limit later.
// TODO: add semisync to remove this limitation.
// Number of backends
const int N = 4;
#define CMESSAGE(msg) \
do { \
stringstream ss; \
@ -506,7 +509,7 @@ bool is_valid_server_id(TestConnections& test, int id)
std::set<int> ids;
test.repl->connect();
for (int i = 0; i < test.repl->N; i++)
for (int i = 0; i < N; i++)
{
ids.insert(test.repl->get_server_id(i));
}