Commit Graph

504 Commits

Author SHA1 Message Date
cb05199bac Stop MaxScale before fixing replication
Before the state of the backend servers is checked, MaxScale needs to be
stopped to prevent the automated failover from interfering in the start-up
process.
2018-07-05 21:03:57 +03:00
5c610503ba MXS-1949: Add test case
Added a test case that verifies the bug is fixed.
2018-07-05 13:47:08 +03:00
bbf3909296 MXS-1958: Add test case
The test case verifies that the problem exists.
2018-07-05 12:01:38 +03:00
d301109b1a Update release document
Use more precise git commands for pushing a single tag.
2018-07-05 12:01:38 +03:00
6b9ae5b220 Fix bug626
Removed the excessive comments in favor of a simplified description. Use
stack-allocated TestConnections and simplify assertions.

The main change is the different SQL used to update the user with the old
password. Direct modification of the `mysql`.`user` database isn't very
neat but it guarantees that the value is updated.
2018-07-04 15:41:17 +03:00
d98ffb5d0a Always stop MaxScale before test
The test should stop MaxScale at the start unless the manual debug flag is
given on the command line. This fixes the connection failure of mxs1719
but reveals a problem with the filter itself.
2018-07-04 13:51:10 +03:00
88431f14d7 Fix cache_basic configuration
The test requires the old default values.
2018-07-04 13:51:10 +03:00
a1ab09a79f Reduce test verbosity
When a test is checking the status of the nodes, the output is relatively
verbose.

Also changed dropping of users to use the IF EXISTS syntax. This will
remove the errors if the users do not exist.
2018-07-03 02:08:25 +03:00
a6182d48bf MXS-1643: Only test existence of extra events mxs1643_extra_events
Don't test failover functionality when it is not needed. The bug is only
about the extra events that appear when a master is demoted and a slave is
promoted.
2018-06-27 10:49:32 +03:00
b7fdaf0340 Use wait_for_monitor in mxs1643_extra_events
Replace hard-coded sleeps in mxs1643_extra_events with
Maxscales::wait_for_monitor.
2018-06-27 08:49:55 +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
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
bf4673d3f7 MXS-872: Add role test case
The test case checks whether roles work via MaxScale.
2018-06-19 12:51:55 +03:00
45f39e7fdd Wait for monitor in mxs1719
Replaced hard-coded sleep with dynamic waiting.
2018-06-18 14:10:27 +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
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
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
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
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
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
cd303df35c Revert "Trunate logs instead of removing"
This reverts commit 14dc215a787e64fb6457889b647c861f634d68a5.
2018-05-25 12:12:35 +03:00
14dc215a78 Trunate logs instead of removing
By truncating the files, tests can be run while the log is being
tailed. If they are removed, the files need to be reopened each time a
test is started.
2018-05-22 15:44:55 +03:00
540df997fb Remove unused templates file
The file has not been used since the templates.h header was added.
2018-05-21 09:50:44 +03:00
9d10642cd7 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-05-18 12:42:24 +03:00
e911c897f6 fix cnf name in add_server_setting() 2018-05-18 12:32:23 +03:00
4b8206ee1d MXS-1873: Test large session commands
The test generates a large session command and makes sure queries after it
work correctly.
2018-05-18 12:29:47 +03:00
2a7f470b6b Make test failure messages unique in mxs1824_double_cursor
Having the same error for two different failures makes it harder to figure
out which one of them fails.
2018-05-17 10:57:05 +03:00
bf933ecc22 Open all ports by default
The test now flushes the INPUT chain of iptables at the start of the
test. This should open all ports even if the OS by default defines some
rules that block ports.
2018-05-17 10:04:00 +03:00
4309d9b3a5 Change mxs1836_show_eventTimes port from 9003 to 4006
Port 9003 is not open by default in the test environment. Changing it to
port 4006, which is open, will work around this restriction.

Also added the mysql_error output to the error message when the querying
fails.
2018-05-17 09:50:37 +03:00
22d6687f9f Fix paths in mxs1110_16mb
The paths that the test used assumed that the binary was built
in-source. This is a relic of the test refactoring and seems to have gone
unnoticed.
2018-05-17 09:39:19 +03:00
52e8c08a61 Disable warnings when dropping databases
Dropping a database with DROP DATABASE ... IF NOT EXISTS will cause
warnings to be logged if it doesn't exist. The masking_user test was
missing the part that disables these warnings.
2018-05-17 09:34:01 +03:00
84ac115af8 MXS-1760: Add use_sql_variables_in test case
The test checks that both text protocol and binary protocol statements
produce the correct result.
2018-05-16 11:13:36 +03:00
2ae46190d0 Remove stale cdc_connector files
The old files were still in the source code which caused problems with the
build.
2018-05-16 11:13:36 +03:00
5ed5d98bcd MXS-1836 Add test that catches regression 2018-05-15 14:45:42 +03:00
e1e7ebe5d2 Remove .gitignore from test directory
The file is not required as the tests can now be built out-of-source. All
common ignored files are still handled by the main .gitignore file.
2018-05-15 10:15:32 +03:00
b776ed7821 Don't assume source and binary directories are the same
Some of the scripts assumed that other scripts would be located in the
same directory where the current script was executed.

Also fixed the SSL connection creation which depended on an obsolete
environment variable causing all out-of-source SSL tests to fail.
2018-05-15 10:14:38 +03:00