If the test would otherwise succeed but a coredump is found when the logs
are copied in the destructor, the test would pass. To prevent this, the
destructor should always exit with a non-zero status when it detects an
error.
Streamlined the test to perform as much testing as fast as possible. The
gradual ramp up did not provide any concrete benefits compared to testing
everything at once.
Replaced structures with C++11 alternatives where possible and removed
unused, redundant or dead code.
Before the state of the backend servers is checked, MaxScale needs to be
stopped to prevent the automated failover from interfering in the start-up
process.
The test should stop MaxScale at the start unless the manual debug flag is
given on the command line. This fixes the connection failure of mxs1719
but reveals a problem with the filter itself.
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.
Now, if a test is invoked with '-l', then MaxScale is assumed to
be running locally using a configuration file suitable for the
test that is invoked. Further, at the end of the test, the log
files of MaxScale are not downloaded (obviously).
As a side-effect, an environment variable no_maxscale_log_copy,
similar to the existing no_backend_log_copy, has been introduced
using which the downloading of maxscale log files unconditionally
can be prevented.
By truncating the files, tests can be run while the log is being
tailed. If they are removed, the files need to be reopened each time a
test is started.
The test now flushes the INPUT chain of iptables at the start of the
test. This should open all ports even if the OS by default defines some
rules that block ports.
The test can now be run outside of the test source directory. Since the
`test_dir` global variable contains the absolute path to the test source,
all copying of configurations and execution of scripts can be done with
minimal changes.
The previous core check would pick up any file in /tmp/ that would start
with the `core` prefix. This included some npm generated files which are
created if MaxCtrl is built on the MaxScale machine.
The test checks that failover works even when the master of the monitored
cluster is a slave to an external masters. The test also verifies that the
servers do not get unexpected status labels.
The test uses a separate writer thread to insert data into the
master. This thread must be halted before the blocking of the master
happens as the slaves must catch up. Once slaves have caught up and the
master is blocked, the writer thread can continue doing inserts.
At the end of the test slaves must also be synchronized before the
inserted data is validated. This prevents test failures due to slave lag.
- 1 master, 3 slaves
- stop maxscale so it does not autorejoin later on
- stop & reset slave on servers 3 & 4
- add data to server 4
- restart maxscale, check that server 3 is rejoined but not server 4
- manually set server 1 to replicate from server 4, creating a relay master
- check that servers 2 & 3 are redirected, making server 1 just a slave
- switchover master to server 1, check that it's the master
Also, moved some common functions into their own files. These functions
are used by multiple tests.
* refactor test backend fixing
* return comatibility with 5.5 for backend restore
* remove backend configuration scripts
* adopt test backed restore function for 2.2 test fw
Combined functions into one which only used different default
values. Removed unused functions. Used std::string where possible to make
their usage easier. Hid code that isn't used externally.
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.
The test expected the wrong error message to be in the log. To better cope
with changes in the text, the test now uses a regular expression to do the
matching.
The scripts start MaxScale processes on two different servers. The support
framework for the tests is in place but the tests themselves still need to
be modified to allow the use of non-localhost addresses.
The MaxCtrl test suite is now a part of the regression test suite. The
cluster tests are expected to fail as that is yet to be implemented.
Also fixed the return value of TestConnections::ssh_maxscale.