Commit Graph

632 Commits

Author SHA1 Message Date
b96228f95c Merge branch '2.2' into develop 2018-06-22 10:44:39 +03:00
c70cc61132 Remove unused code in mysqlmon_failover_rejoin_old_slave
The sleep function is no longer used.
2018-06-22 10:37:11 +03:00
bb67c4fb8f Remove unused test
The test was not used.
2018-06-22 10:37:11 +03:00
9f2a4c4368 Request GTID in mysqlmon_failover_rejoin_old_slave
The test won't otherwise work as the failover is not done without it.
2018-06-22 10:37:11 +03:00
c49b6ada7d MXS-1932: Make it clear what is being tested
The test was not very clear about what it does. Added comments to clarify
what is done and why. Also fixed a typo.
2018-06-21 15:17:10 +03:00
d22a62c0ff Use sleeps and waits with mxs1719
Going the belt-and-suspenders way of both sleeping and waiting for the
moitor should make sure MaxScale has at least some time to start up, query
the servers and do a single iteration of monitoring.
2018-06-21 15:12:12 +03:00
d9cc65cca7 Enable mxs1824_double_cursor in 2.2
The test apparently started working when 10.3 was set as the default
backend.
2018-06-21 15:12:12 +03:00
8a526bf84f MXS-1926: Add test case
Added a test case that reproduces the problem and verifies that it is
solved.
2018-06-21 15:12:12 +03:00
396f5d96c2 Merge branch '2.2' into develop 2018-06-20 14:43:03 +03:00
7a0a6c3af1 MXS-1932: Add test case
Added test case that reproduces the problem and verifies that it is fixed.
2018-06-20 14:41:56 +03:00
6278f27ab6 Merge branch '2.2' into develop 2018-06-20 10:26:29 +03:00
5350817790 Flush hosts in parallel
The Mariadb_nodes class now performs the node flushing in parallel. This
should speed up startup. Also increased the max_connect_errors.
2018-06-20 08:45:18 +03:00
8f71e803c1 Copy test logs in parallel
The log copying is now done in parallel for all VMs.
2018-06-20 08:40:17 +03:00
bf4673d3f7 MXS-872: Add role test case
The test case checks whether roles work via MaxScale.
2018-06-19 12:51:55 +03:00
5438140e33 Wait for monitor in mxs1476
Use Maxscales::wait_for_monitor instead of hard-coded sleeps. This should
make testing faster, more accurate as well as more robust.
2018-06-18 14:25:05 +03:00
87796a4bb5 Update bug547 to expect correct behavior
Readconnroute with router_options=slave will use a master if one is
available. The test still expected the old behavior where masters were
never used with router_options=slave.
2018-06-18 14:25:05 +03:00
7a354bb28e Add slave reconnection regression test
After a session command fails on all connected slaves but succeeds on the
master, the servers that failed are discarded from the pool of valid
servers. If there are available servers, they will be taken into use when
the next read query is performed.

When a query is routed to an unconnected slave, it is taken into use and
the session command history is replayed. If the execution of the history
failed and there were more session commands to be executed, any queued
queries would get lost. This is due to a missing check that would detect
the fact that the server has been discarded.
2018-06-18 14:25:05 +03:00
45f39e7fdd Wait for monitor in mxs1719
Replaced hard-coded sleep with dynamic waiting.
2018-06-18 14:10:27 +03:00
0f187807c1 MXS-421 Add system test 2018-06-18 11:32:50 +03:00
24bb8b0b2c Clean up mxs548_short_session_change_user
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.
2018-06-18 11:32:28 +03:00
2005164222 Fix slave reconnection logic
Allowing calls to select_connect_backend_servers even when all slaves are
connected solves the debug assertion in select_connect_backend_servers
that happens when the execution of a queued query causes a new connection
to be created.
2018-06-15 16:16:53 +03:00
17535acfc3 Fix test failures
Replaced sleep in bug676 with wait_for_monitor, removed unsupported
commands from maxinfo_sql.
2018-06-15 16:16:52 +03:00
61cc709519 Prevent hangs in mxs173_throttle_filter
The test now sets a two minute timeout for all larger operations. This
prevents excessive waiting when the test is executed.

Removed the row count output to stdout to prevent excessive logging when
the terminal contents are written to a file.

Also renamed the file to match the test case name. This should remove the
need to find the source file to test name mapping from the CMakeLists.txt.
2018-06-15 16:16:52 +03:00
ba0e3bd6b7 Speed up avrorouter testing
Cut test time from about 300 seconds to 200 seconds.
2018-06-08 12:18:14 +03:00
0d73530ff3 Merge branch '2.2' into develop 2018-06-08 11:30:55 +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
7be11af911 Fix release documentation
Copied the contents of the pull request to the wrong repo to the correct
one.
2018-06-08 07:45:18 +03:00
600d459079 Fix attribute assignment in mxs1824_double_cursor
Used correct type, checked for return value.
2018-06-08 07:45:18 +03:00
238a00f29d Set mysqlmon timeouts to 10 seconds
The backend timeouts should help prevent disconnections.
2018-06-08 07:45:18 +03:00
70fdd0fc17 Merge branch '2.2' into develop 2018-06-06 08:56:31 +03:00
cfe676b1c8 Sleep longer in mysqlmon_* tests
Increased the amount of time that the tests sleep while they wait for
states to change. This should make them more tolerant of server load by
allowing more time for things to settle down.
2018-06-06 08:46:46 +03:00
994d3bc22d Disable mxs1824_double_cursor
The test doesn't work due to the fact that the connector can't open two
cursors at the same time.
2018-06-06 08:46:45 +03:00
e6a9b83269 MXS-1899: Test that generated [maxscale] sections work
The test alters the configuration at runtime and restarts MaxScale.
2018-06-06 08:46:45 +03:00
a5377212a6 MXS-1507: Add transaction replay stress test
The test performs transactions while the master server is stopped and
started.
2018-06-04 19:26:36 +03:00
74cc74ed66 Remove MySQL 5.1 support from tests
Removed the configuration parameter template and the code that uses it.
2018-06-04 19:26:36 +03:00
4a3216d483 Merge branch '2.2' into develop 2018-06-04 16:00:19 +03:00
d22f6d7b1c MXS-1743: Fix load balancing with router_options=master,slave
The code that selects the candidate backend always returned the root
master if the server bitmask contained the master bit. This should only be
done if the master bit is the only bit in the bitmask and when there are
other bits, the normal candidate selection code should be used.

Also added a query to the expanded test case to make sure the connection
actually works.
2018-06-04 15:17:48 +03:00
da4397a501 MXS-1743: Expand test case to cover load balancing
The test case now verifies that the servers are actually load balanced
correctly. This test reveals a problem in the readconnroute; the master is
always preferred over slaves if one is available with
router_options=master,slave.
2018-06-04 15:17:48 +03:00
cddcc6d7d5 MXS-1896: Distinct LOAD DATA LOCAL INFILE from LOAD DATA INFILE
The two operations return different types of results and need to be
treated differently in order for them to be handled correctly in 2.2.

This fixes the unexpected internal state errors that happened in all 2.2
versions due to a wrong assumption made by readwritesplit. This fix is not
necessary for newer versions as the LOAD DATA LOCAL INFILE processing is
done with a simpler, and more robust, method.
2018-06-04 15:17:48 +03:00
2ed631ab63 Merge branch '2.2' into develop 2018-06-01 13:46:03 +03:00
dc94ec9963 MXS-1889 Improve test program
Verify that once there are slaves, we are connected
to a slave as expected.
2018-06-01 12:45:19 +03:00
a319c5ad19 MXS-1889 Add test
If all slaves are down, a connection should be created to the
master.
2018-06-01 11:00:13 +03:00
5d02d8c0ba Merge branch '2.2' into develop 2018-06-01 09:33:04 +03:00
8917458505 MXS-1890 Make it easier to run tests using local MaxScale
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.
2018-05-30 21:05:10 +03:00
2a76a36505 MXS-1778: Add missing test config
The test for the causal reads did not have the configuration file for it.
2018-05-28 10:32:17 +03:00
3cd162e1da Update avrorouter test configurations
The router_options was deprecated in 2.2 and is now removed in 2.3. This
means that test configuration files must be updated as well.
2018-05-28 10:32:15 +03:00
f62d155036 MXS-173 Test for throttling filter
The test may fail if the client/maxscale/mariadb combo is too slow.
TODO, maybe: today I saw mysql_query() hang (in a poll) when maxscale
disconnected. Is there something that can be done about that?
I added a source directory, base, for stuff that should become part of a common
utility library in the future.
2018-05-25 14:51:36 +03:00
40b31621c8 Merge branch '2.2' into develop 2018-05-25 12:15:58 +03:00
cd303df35c Revert "Trunate logs instead of removing"
This reverts commit 14dc215a787e64fb6457889b647c861f634d68a5.
2018-05-25 12:12:35 +03:00
b59e6a4baf Increase the timeouts different_size
A slight increase of the timeout to 300 seconds should solve some test
failures. The test is extremely hard on the machines and even when run
locally, the test slows down to a crawl.
2018-05-22 17:46:27 +03:00