Syslog wasn't truncated which caused massive disk space usage when the
full test set was run. Also removed the creation of empty log files if no
messages were logged during the run.
MXS-2236 Add own long test and possibility to run tests under Valgrind
Long test executes INSERT queries, transactions, prepared statements in parallel to create weird load on Maxscale to catch crashes and leaks
Test is not included into ctest scope. Test should be executed manually. For BuildBot (and also for run_test.sh) 'test_set' should be set 'NAME# ./long_test'
Time to run test is defined by 'long_test_time' variable (in seconds)
Possibility to run Maxscale under Valgrind is also added. To run Maxscale under Vaslgrind 'use_valgrind=yes' variable have to be defined
* add possibility to run named test
* remove sysbench_dir
* remove unsupported in 1.0 sysbench options
* exculed ReadConnRouter sysbench test
* fix sysbench table name
Given that the pattern is given as an argument quoted with single quotes,
embedded single quotes are a problem. Given that most cases that they are
used for is as parts of natural words like can't or won't. By replacing
the single quotes with wildcard characters, we make sure the input is
formatted correctly while still matching with relatively high accuracy.
If a test requires Galera but it is not available, it is now skipped. All
tests that explicitly use the `test.galera` member as well as all tests
that use a Galera configuration now require that Galera is present.
If the test uses two MaxScales, they are automatically stopped after the
test. This prevents the second MaxScale from interfering with subsequent
tests.
By exposing a (currently undocumented) debug endpoint that lets one
monitor interval pass, we make the reuse of the monitor waiting
functionality a lot easier. With it, when MaxScale is started by the test
framework it knows that at least one monitor interval will have passed for
all monitors and that the system is ready to accept queries.
The collection of the various artifacts generated by a test case and the
core dump detection is now done in the same SSH command. This removes the
extra overhead that it added.
There were a total of five SSH connections opened at the start of each
test. Only two of these are currently required: the SSL certificate
directory check and the actual command that restarts MaxScale. Two of the
three remaining commands, stopping of MaxScale and copying of the
configuration, can be made conditional or combined into other
commands.
The stopping of MaxScale is done to prevent it from interfering with the
cluster setup process. As MaxScale does nothing if nothing is wrong, it is
safe to make the restart conditional so that it is done only when a
problem in the cluster setup is detected.
The final SSH command, the MaxScale health check via maxadmin, can be
removed as it is redundant: the daemonization already covers this by
exiting only after MaxScale is ready.
When running BLR locally, you need to be able to specify what
IP the BLR is visible at (127.0.0.1 does not work for VM nodes)
and also to perform cleanup etc. action when needed.
The test adds a scheduled server event, the does failover, rejoin and
switchover and checks that event is manipulated correctly. Also includes
a change to the monitor to fix an invalid ALTER EVENT query when the event
definer has wildcard host.
If a test program needs other than the default Galera config
(e.g. log_slave_updates enabled), then it should be able to
programmatically cause galera to be restarted as part of the
TestConnections construction.
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
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.