Commit Graph

9 Commits

Author SHA1 Message Date
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
6279ab350c Rename TestConnections::assert() to TestConnections::expect()
Allows the including of <assert.h>.
2018-09-10 10:24:46 +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