MXS-1509: Initial implementation of test case

Added some code to detect server states in a consistent manner and created
the test. The multi-source replication appeared to cause problems for the
test system which needs to be resolved.

Added --force flags to most direct `mysql` calls to prevent errors from
stopping the processing of remaining commands.
This commit is contained in:
Markus Mäkelä
2017-11-23 12:58:21 +02:00
parent d5d41349ae
commit 016b0f69f7
5 changed files with 189 additions and 12 deletions

View File

@ -6,6 +6,10 @@
#include <fcntl.h>
#include <pthread.h>
#include <sys/time.h>
#include <set>
#include <string>
typedef std::set<std::string> StringSet;
/**
* @brief Class contains references to Master/Slave and Galera test setups
@ -657,6 +661,15 @@ public:
void check_current_operations(int value);
void check_current_connections(int value);
/**
* @brief Get the set of labels that are assigned to server @c name
*
* @param name The name of the server that must be present in the output `maxadmin list servers`
*
* @return A set of string labels assigned to this server
*/
StringSet get_server_status(const char* name);
/**
* @brief check_maxscale_processes Check if number of running Maxscale processes is equal to 'expected'
* @param expected expected number of Maxscale processes