Commit Graph

504 Commits

Author SHA1 Message Date
d506f01de9 Add basic MaxCtrl test
The test does a very minimal check for MaxCtrl functionality.
2018-01-31 13:38:28 +02:00
4b7c334c1b Add a timeout to mxs1585
The test will hang if one of the threads doesn't exit. To detect failures
faster, a timeout is needed.
2018-01-31 13:38:28 +02:00
3dfb972d87 Merge branch '2.1' into 2.2 2018-01-30 16:28:11 +02:00
f9cc2d5bbb use 'mdbci destroy' instead of 'vagrant destroy' (#163)
use mdbci destroy instead of vagrant destroy
2018-01-30 15:48:05 +02:00
5bc945df3f Allow monitor to stabilize in mxs1516
The test needs to give the monitor enough time to detect the change in the
replication topology in order for it to work.
2018-01-30 11:08:41 +02:00
524e55bf52 Sync slaves before checking MaxScale is alive
Synchronizing the slaves before checking that MaxScale is still alive
makes sure the slave servers have settled down to a known state.
2018-01-30 11:08:41 +02:00
1a33c1caef Build CDC connector into the core test library
The CDC connector can be build directly into the core testing library for
testing purposes. This way we remove an unnecessary dependency on a
library. This commit fixes the linkage failure of the cdc_datatypes test.
2018-01-30 11:08:41 +02:00
cf0d745c14 MXS-1583 Add test that exposes the behaviour
This will fail with MaxScale 2.2.1.
2018-01-29 15:25:21 +02:00
4dc9b56d29 Fix check_backend
Fixed the core generation and removed obsolete files.
2018-01-26 10:41:34 +02:00
3da4aa1665 Remove trailing whitespace in check_backend
Removed trailing whitespace in check_backend
2018-01-26 10:23:05 +02:00
4e9a5af926 add execution of add_core_conf.sh to 'check_backend' to set up core dump saving 2018-01-26 09:35:02 +02:00
d681d0f2fa Add manual rejoin tests 2018-01-25 11:49:37 +02:00
c96d27a495 MXS-1538: Use the integrated CDC connector
Now that the connector resides in the same repository, it can be built as
a library for the tests. Installing the development package is one option
but it would unnecessarily complicate the build process.
2018-01-23 16:32:48 +02:00
f45911caf8 Extend galera_priority test case
The test now verifies that the node priorities are in effect even after
MaxScale is restarted.
2018-01-23 16:32:48 +02:00
653b8429d4 Extend cdc_datatypes test
The test now also checks DATE, DATETIME and TIMESTAMP types.
2018-01-23 10:50:39 +02:00
f204650bbb MXS-1538: Remove unnecessary copying of schema information
The schema related information was copied for each row. A shared pointer
to the data can be used to remove the repeated copying of the values.
2018-01-22 15:29:21 +02:00
bbe99e458d Fix test build failure
MXS-1543 test failed to build in 2.2.
2018-01-19 11:34:25 +02:00
dbbeeac145 MXS-1596 Use non-privileged user for client
The pre-existing users in the MaxScale test environment have
the super privilege so they are not affected by the database
being set in read-only mode.

Consequently, a custom user without the super privilege must
be used by the client threads.
2018-01-16 16:08:13 +02:00
bf02571f45 MXS-1596 Test switchover under stress
- 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.
- Perform a switchover from the current master to the next (which is
  simply the next node % all nodes).
- Keep on doing that for 1.5 minutes.

The expectation is that the switchover will succeed, that is, after the
operation there will be a new master.
2018-01-16 10:31:27 +02:00
0afe10ffb9 Merge branch '2.1' into 2.2 2018-01-16 09:47:49 +02:00
8dfc1a141d fix typo in read_env() and set_env.sh 2018-01-15 17:17:44 +02:00
847dd2c120 fix typo in read_env() and set_env.sh 2018-01-15 16:47:15 +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
1e5125015e Add convenience functions to TestConnections 2018-01-11 10:33:57 +02:00
eda8288161 Rename and fix test
Test now tries to reset the servers when successful.
Still seems to rarely fail.
2018-01-10 15:25:58 +02:00
96a8d20439 Reduce binlog_change_master output
The output was very verbose and did not provide a lot of information. This
made it hard to see what is going on in the test.
2018-01-10 15:08:06 +02:00
a4dc99d07c Reset situation after test
If node00 is not the master when a test is started, the cleanup
performed by TestConnections takes considerable time.

By restoring the sitation back to normal before ending the test,
the startup time of the next test can be shortened significantly.
2018-01-09 12:48:49 +02:00
a4c4c26ab9 Increase timeouts of mysqlmon_switchover
With default timeouts test failed on max-tst-01
2018-01-09 12:48:49 +02:00
eff88f7126 Disable detect_standalone_master in replication template
The template is used by tests that expect the functionality to be
disabled.
2018-01-09 10:57:18 +02:00
d1944d015d Verify that connections fail in bug547
The test assumed that the connections failed but it did not check that it
actually did.
2018-01-09 10:57:18 +02:00
5fda35a998 Properly disable server settings
In the config files, spaces in setting names can be either with
_ or -, so need to disable both versions.
2018-01-08 16:15:31 +02:00
68ab6ea7e0 Disable log_slave_updates on failover tests
Some test environments may have the setting enabled. It should be
disabled on server3 to get consistent results.
2018-01-08 15:22:47 +02:00
c64fd4f39f MXS-1543: Add test case
Added test case that checks that statement based replication is detected.
2018-01-05 12:50:39 +02:00
3c5963cf3b Reset default master node state as well
Now that mariadbmon supports failover and switchover, a test may
may change the master to some other node than node 0.

Consequently, as part of fixing the replication, gtid_slave_pos
of node 0 must be reset as well.
2018-01-05 12:47:57 +02:00
bed0b850b1 Merge branch '2.1' into 2.2 2018-01-05 09:58:10 +02:00
1bd20cd2eb temopary disable snapshot revert due to Galera failures 2018-01-05 09:40:41 +02:00
a6914ebefe MXS-1565: Test for invalid old master rejoin
The test uses standard setup (1xMaster, 3xSlaves).

1. Shutdown master (server 1), check that autofailover promotes
a new master.
2. Stop MaxScale.
3. Start server 1 and add some events to it so it can no longer rejoin
cluster.
4. Start MaxScale, check that server 1 does not join.
5. Set current master to replicate from server 1, turning it to a relay
master.
6. Check that server 1 is master, all others are slaves (due to auto-rejoin).
2018-01-04 10:34:03 +02:00
e0a584a626 add ulimit setting for tests 2018-01-03 14:12:43 +02:00
7d8905d91f Merge branch '2.1' into 2.2 2018-01-03 14:05:31 +02:00
00ca809963 MXS-1542: Add test case
Added test case that checks whether UTF16 strings work. The test is
expected to fail.
2018-01-03 10:37:25 +02:00
bacc11d28e MXS-1516: Validate the connection on each query
A subset of the checks done at connection creation time need to be done at
query routing time. This guarantees that the connection is closed if the
server no longer qualifies as a valid candidate.

Added teset case that checks that a change in the replication topology
correctly breaks the connection.
2018-01-02 11:03:36 +02:00
eddd4db606 MXS-1562 Test switchover under ideal conditions 2018-01-02 10:21:01 +02:00
3f0ef7481e Fix test build failure
The ssh_node_f function does not exist in 2.1.
2018-01-02 10:10:25 +02:00
cf29430476 Merge branch '2.1' into 2.2 2018-01-02 09:31:07 +02:00
6645281aeb add killing mysqld process after snapshot revert 2018-01-02 07:32:44 +02:00
ef79db4362 add killing mysqld process after snapshot revert 2017-12-29 12:12:20 +02:00
d2a30cf7d7 Modify test mxs1585.cpp for 2.2 2017-12-29 11:57:13 +02:00
8ac5c3d377 MXS-1585: Make the test more precise
The test now more precisely exercises the code where the crash happened.
2017-12-29 11:04:13 +02:00
ee8161af83 Fix mxs1509
Temporarily disable the multi-source part of the test. Explicitly set
gtid_slave_pos when changing master. Add missing parameter to
configuration.
2017-12-29 11:01:07 +02:00
8b2aa52384 Merge branch '2.1' into 2.2 2017-12-29 08:42:49 +02:00