When a test is checking the status of the nodes, the output is relatively
verbose.
Also changed dropping of users to use the IF EXISTS syntax. This will
remove the errors if the users do not exist.
The tests failed to compile due to invalid use of try_query. For some
reason this wasn't detected by newer compilers.
Also fixed the compilation failure of mxs1713_lots_of_database on CentOS
7.
Handle the problematic transaction with session command as well as empty
transactions. Also changed test to use wait_for_monitor as well as pass
the value to check as a parameter to the `check` function.
The test methods that take printf style input now have the printf
attribute. This enables format checks making oversights less likely.
Also fixed any existing errors in the code. Only the one in
test_binlog_fnc.cpp would've had an actual effect.
Don't test failover functionality when it is not needed. The bug is only
about the extra events that appear when a master is demoted and a slave is
promoted.
Going the belt-and-suspenders way of both sleeping and waiting for the
moitor should make sure MaxScale has at least some time to start up, query
the servers and do a single iteration of monitoring.
Readconnroute with router_options=slave will use a master if one is
available. The test still expected the old behavior where masters were
never used with router_options=slave.
After a session command fails on all connected slaves but succeeds on the
master, the servers that failed are discarded from the pool of valid
servers. If there are available servers, they will be taken into use when
the next read query is performed.
When a query is routed to an unconnected slave, it is taken into use and
the session command history is replayed. If the execution of the history
failed and there were more session commands to be executed, any queued
queries would get lost. This is due to a missing check that would detect
the fact that the server has been discarded.
The test unnecessarily did an unconditional drop of the user resulting in
errors. Also prevented stopping of MaxScale if it wasn't started in the
first place.
Allowing calls to select_connect_backend_servers even when all slaves are
connected solves the debug assertion in select_connect_backend_servers
that happens when the execution of a queued query causes a new connection
to be created.
The test now sets a two minute timeout for all larger operations. This
prevents excessive waiting when the test is executed.
Removed the row count output to stdout to prevent excessive logging when
the terminal contents are written to a file.
Also renamed the file to match the test case name. This should remove the
need to find the source file to test name mapping from the CMakeLists.txt.
The tests can now wait for a number of monitor intervals. This removes the
need to have hard-coded sleeps in the code and makes monitor tests more
robust under heavier load.
Increased the amount of time that the tests sleep while they wait for
states to change. This should make them more tolerant of server load by
allowing more time for things to settle down.