Commit Graph

998 Commits

Author SHA1 Message Date
ccec2a387a Fix replication in parallel
If the replication is broken between the nodes, it is now fixed in
parallel on all nodes instead of doing it one server at a time.

This reduces the time from about 120 seconds to 13 seconds. The time was
measured by running the check_backend test first with all backends broken
and then with the fixed backends subtracting time of the latter from the
former.
2018-11-09 09:13:25 +02:00
04e4f17618 Sort tests by replication type
The tests that require GTID replication are now all grouped together. This
removes the need to reconfigure the test environment multiple times.
2018-11-09 09:13:25 +02:00
3a5b49caf1 Speed up mxs1751_available_when_donor_crash
As the wait_for_monitor function guarantees that the monitor notices the
state change, we can skip the replication fixing which was somewhat
superficial in the first place.
2018-11-09 09:13:25 +02:00
c523bf74b8 Rewrite binlog_change_master tests
The tests were consistently unstable and as a result of this did not
provide any actionable output. In addition to this these two test were the
longest running tests in the whole MaxScale test suite so a re-design was
warranted.

Instead of emulating a client and a server failure, testing functionality
provides for a test that is faster, more precise and provides more
actionable output. Due to the single-threadedness of the new test, no
cross-thread depencies are present. In addition to this, the superfluous
log flushing was not done as it almost always happened after all
transactions were already complete.

The estimated savings in test time alone is around 1100 seconds (roughly
18 minutes).
2018-11-09 09:13:25 +02:00
b77d5568d8 Add output to mxs1743_rconn_bitmask
This helps analyze why the test is hanging when the slaves are synced.
2018-11-09 09:13:24 +02:00
6a8ba999bd MXS-2095: Fix crash on GRANT CREATE TEMPORARY TABLE
The avrorouter classified the GRANT statement as a CREATE TABLE statement.
2018-11-08 08:31:48 +02:00
8f8e92684a Ensure that correct slave is promoted
Should make the test more likely to succeed.
2018-11-07 12:55:59 +02:00
383b0b1989 Merge branch '2.2' into 2.3 2018-11-06 21:12:20 +02:00
3300bfd17f Remove test for passwd removal
Configs with passwd are still accepted in 2.3.
2018-11-06 15:09:14 +02:00
b2d1a5b91b Remove unnecessary sleeps from mxs812_2
The 20 second sleep was not needed. Using wait_for_monitor is better since
it makes sure the blocking of the nodes is visible.
2018-11-06 15:08:36 +02:00
c6e51e7513 Shorten mxs1585
The test description talks about putting the master into maintenance mode
but it spends most of the time putting slaves into maintenance mode. To
make the test more precise (and fast) the test can be reduced to blocking
the most often used slave and the master. The iteration count can also be
lowered from five to two to get at least two cycles of maintenance mode.
2018-11-06 15:08:36 +02:00
2fa37aa18a MXS-2106: Add test case
Added a test case that reproduces the problem and verifies that it is
solved.
2018-11-05 13:37:29 +02:00
348c86d22b Rewrite change_user test
Rewrote the test and expanded the test coverage. This unveiled a bug in
readconnroute where the connection isn't closed when a COM_CHANGE_USER
fails.
2018-11-05 13:37:21 +02:00
49587d78d8 Make sure created event is dropped before exiting
Tests should clean up after themselves and in the case of this event, it
can cause problems with other tests.
2018-11-04 21:09:13 +02:00
e5d6e5329a Format source code
Formatted all of the source code that was not accordance with the coding
style. This was caused by merges from 2.2 into 2.3.
2018-11-01 14:05:15 +02:00
80b23b428a Remove obsolete tests
Removed the tests obsoleted by the sanity_check test case. This shortens
the test time by about a minute and a half and removes about 2500 lines of code.
2018-11-01 11:45:49 +02:00
ee069ac45c MXS-2131: Add sanity check test
The sanity check replaces several old regression tests and provides a
quick test for checking mainly the readwritesplit routing behavior. It
also checks some of the connection counts and runs queries that once
caused a crash.

The set of tests that the sanity check obsoletes is:

    bug422
    bug469
    bug448
    bug507
    bug509
    bug634
    bug694
    bug669
    bug711
    mxs127
    mxs47
    mxs682_cyrillic
    mxs957
    mxs1786_statistics
    rwsplit_read_only_trx
2018-11-01 11:45:49 +02:00
906d8cee5b Format all files
Formatted all files with uncrustify.
2018-10-31 09:46:02 +02:00
7deed35587 Merge branch '2.2' into 2.3 2018-10-31 09:03:09 +02:00
ceb4a18f59 Enable query_retries for mxs1961_standalone_rejoin
This should help prevent network disconnections and make the test more
stable. If the connection is lost, the automatic failover is disabled and
the test will fail.
2018-10-30 18:43:37 +02:00
d972c1cd37 Fix replication before syncing slaves in mxs1743_rconn_bitmask
This might help solve the problem where the test hangs when the slaves are
synced.
2018-10-30 18:43:37 +02:00
471cd8f0ef Increase timeouts for mxs431
The test appears to have timed out a few times when creating the
databases.
2018-10-30 18:43:37 +02:00
31859ee486 Remove ses_bigmem test
The test doesn't work when ASAN is used as it increases the memory use of
the process. With the addition of more caches in 2.3, the test is also
more likely to fail. Due to the test being quite useless with ASAN, it is
better to remove it.
2018-10-30 18:43:37 +02:00
ce35b0d541 Merge branch '2.2' into 2.3 2018-10-30 14:16:33 +02:00
93b9ed744f MXS-2111: Use authentication_string when password is empty
If the password field in mysql.user is empty, it is possible that the
actual password is stored in the authentication_string field. Most of the
time this happens due to MDEV-16774 which causes the password to be stored
in the authentication_string field.

Also added a test case that verifies the problem and that it is fixed by
this commit.
2018-10-30 12:45:36 +02:00
7e21e3aedd MXS-2115: Fix handshake version string
The intention was to send the lowest backend version string automatically
to the client instead of the default handshake version. This did not work
as the service version string was used instead of the server version.
2018-10-30 12:45:23 +02:00
4d8a95d041 Merge commit '262f1d7e471bacca6b985ec3f2cd5cb76d6e2584' into 2.3 2018-10-26 12:44:57 +03:00
6d00dbfc92 Fix mxs2043_select_for_update
Explicitly define the host of the user being created and sync
replication after it.
2018-10-19 15:18:16 +03:00
0e2e74d1e1 MXS-2090 Extend test program
Now the same tests are run, first using GTID replication, then
file + position replication.
2018-10-19 08:03:11 +03:00
f8cf5053bd MXS-2103: Fix CREATE TEMPORARY TABLE detection
The table creation was not detected as the function used to extract the
table name did not return the fully qualified names. Even if it did return
a fully qualified name, it wouldn't have been correctly processed.
2018-10-18 20:26:58 +03:00
6e43a900c6 Fix keepalived_masterdown
Backends use gtid-replication and the test is faster.
2018-10-16 16:09:38 +03:00
20af9afb49 Merge branch '2.2' into 2.3 2018-10-16 11:10:48 +03:00
c3cd119454 Speed up mm test
The test did not use the wait_for_monitor function to sync with the
monitor. This function speeds up the testing greatly by removing
unnecessary sleeps from it.

Also reduced the amount of data inserted into the cluster. There's no real
need to test with large amounts of data as it is only a functional test.
2018-10-16 11:06:06 +03:00
6170a2193d Merge branch '2.2' into 2.3 2018-10-11 11:12:31 +03:00
9789159427 Add missing type 2018-10-08 10:21:51 +03:00
13d0c818f3 Stop keepalived after the test
Stopping keepalived on all nodes prevents it from interfering with tests
run after it.
2018-10-08 10:08:46 +03:00
a0d12191da Create test database when processing config template
For an unknown reason, the mxs874_slave_recovery test times out unless the
test database is created when the config templates are being processed.
2018-10-08 09:53:30 +03:00
a9a20bf16b Fail faster in mxs1929_filter_runtime
If the test fails, there's no point in continuing with the load generation
as it only serves to slow things down. In few cases the test caused
std::bad_alloc to be thrown which prematurely stopped the ctest run.
2018-10-08 01:07:22 +03:00
3d06b5129d MXS-1980 Extend test program
Now the test program will

1) Write to each node in a Galera cluster and verify that the data
   ends up in the slave.
2) At the end of 1) execute STOP SLAVE and START SLAVE to check that
   replication can be stopped and started again (won't work unless
   each node has the same server_id and value for @@log_bin_basename).
3) Block the node BLR is replicating from and expect it to connect
   to the next configured master and that replication continues to
   work. Do that for all nodes.
4) Stop MaxScale and restart it and expect 3) to work. That checks
   that BLR saves all necessary information in master.ini and is
   capable of reading it.
2018-10-05 12:16:18 +03:00
c4e1e19f4a MXS-1980 Check that Galera replication works
It should be possible to START SLAVE and STOP SLAVE irrespective
of which Galera node updates are mode to.

That will be the case if @@log_slave_updates is on and each node
in the Galera cluster have the same server id. Otherwise it will
fail with the current incarnation of BLR.
2018-10-05 12:16:18 +03:00
fed5037081 Make copying of SSL certs conditional
If the certs exist, they are not copied. This makes testing slightly
faster.
2018-10-05 11:25:50 +03:00
8029bdff4f Process maxscale.cnf template with one sed command
Using a single sed command with multiple -e flags is faster than multiple
separate sed commands.
2018-10-05 11:25:49 +03:00
75ea1b6ea1 Fix formatting of new(std::nothrow)
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
1af43d4ff5 Speed up mxs1961_standalone_rejoin
The waits were needlessly long. Also cleaned up a bit.
2018-10-04 20:29:19 +03:00
70907097c5 Exclude MXS-2047 test case
Moved to the MXS-2047 branch.
2018-10-04 15:17:54 +03:00
80c731f02a Fix verify_master_failure
The log message had changed, changed test to match. Also, the remaining
delay is now printed.
2018-10-04 13:38:10 +03:00
db6a187cd3 Fix mysqlmon_external_master
Removed unneeded operations, added comments and cleanup. The test requires a larger
rework to be more useful.
2018-10-04 13:33:33 +03:00
2e589e0328 Fix mysqlmon_rejoin_bad2
The test didn't work correctly with the failover/switchover changes.
Also cleaned up the test a bit.
2018-10-04 13:09:28 +03:00
9ecd027ea0 Test: Provide additional control of local MaxScale
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.
2018-10-04 12:57:54 +03:00
74effa6e7f MXS-2054: Add test case
Add test case that emulates a hybrid cluster of MariaDB and ColumnStore
instances.
2018-10-04 10:52:40 +03:00