Avoid using test.repl->N in MariaDBMonitor tests
The value may not match the nodes used by the test.
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user