Commit Graph

20 Commits

Author SHA1 Message Date
87e350f171 Remove hard-coded server_id from mysqlmon_failover_stress
Dynamically probing the server_id prevents the test from failing if the
server configuration is changed.
2018-11-19 20:19:21 +02:00
396da06eb8 Move sync_with_stdio into TestConnections constructor
This way all tests run with the same configuration.
2018-11-15 14:24:41 +02:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
8c561c6e55 Merge branch '2.2' into develop 2018-09-13 12:26:58 +02:00
b3d6e49061 Shorten mysqlmon_failover_stress
The test fails since slaves are constantly going out-of-sync and cannot rejoin
the cluster. After three failovers, the cluster has three standalone server and
the monitor gets confused which server is the master. For now, limit the test to
two failovers.
2018-09-13 11:33:19 +03:00
d65d815b99 Add format attribute to test functions, fix resulting errors
Fixes mysqlmon_failover_stress.
2018-09-13 11:33:19 +03:00
edd5ddcc88 Merge branch '2.2' into develop 2018-09-10 12:29:00 +03:00
6279ab350c Rename TestConnections::assert() to TestConnections::expect()
Allows the including of <assert.h>.
2018-09-10 10:24:46 +03:00
c447e5cf15 Uncrustify maxscale
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.
2018-09-09 22:26:19 +03:00
28e55b260f Fix test failures
Added timeouts to maxinfo_sql and mysqlmon_failover_stress, fixed
fwf_syntax to work with out-of-source test runs.
2018-07-31 22:32:31 +03:00
f2e44eb5e2 Add missing newline to mysqlmon stress test assertions
The tests did not add a new line to the assertion output which would
explain why no output from the test itself was given.
2018-07-11 14:08:50 +03:00
5c4926b899 Use C++11 RNG in mysqlmon tests
The glib re-entrant random number generation functions crashe on CentOS 7
for no apparent reason. As the C++11 random number library provides a more
versatile, widely supported and simple method of acquiring random numbers,
it should be used instead.
2018-07-09 12:10:36 +03:00
b98c0841b4 Enable and fix -Wextra warnings
Fixed all warnings that were present with -Wextra.
2018-07-03 15:07:19 +03:00
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
d0feff5eb3 Wait for a number of monitor intervals in tests
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.
2018-06-08 07:45:18 +03:00
421e64ceeb Take -Wall into use for tests
Take almost all warnings into use except `format-overflow` and
`unused-function`. format-overflow needs to be handled in a separate
commit.
2018-04-23 14:02:54 +03:00
e56aedb85f Reset failures if auto_failover is disabled
When auto_failover has been disabled due to failure to perform automatic
failover, the test should reset the number of failures. Resetting it
before the check for the log message allows the test to still fail if the
message is missing.
2018-02-20 09:59:05 +02:00
b468f2f639 Check for failover turned off if failover stress tests fails
If there are no masters at the end of the test, it suggests the
auto failover has been turned off. Check that.
2018-02-12 16:30:43 +02:00
062da5c956 Remove master count assertion in mysqlmon_failover_stress
The assertion can be triggered if failover has failed. This is expected
behavior if the master has executed events that the slaves haven't
received.
2018-02-12 16:01:07 +02:00
ad634fe31e MXS-1596 Stress test for failover
- Start 4 threads where each thread sits in a loop and performs
  20% updates and 80% selects. Each thread has a table of its own.
- The main thread executes the following in a loop.
  - Take down the current master and wait a while (failover assumed
    to happen).
  - Put up the old master node and wait a while.

Keep on doing that for 1.5 minutes.

At the end check that:
- There is one 'Master'.
- The other nodes are either
  - 'Slave' or
  - 'Running' in which case it is checked it is because the node could
    not be rejoined.
2018-01-12 15:56:52 +02:00