Commit Graph

632 Commits

Author SHA1 Message Date
def8cb5071 Add C++ helper for SSH output
The ssh_output function returns a string and takes a std::string as the
ssh command parameter.
2018-07-17 11:52:17 +03:00
4bf6233d2a Drop created tables in tests
If a table is created in a test, it should also drop the table.
2018-07-17 11:52:17 +03:00
12b4f67f30 Skip mxs421_events if syslog doesn't log to file
The test cannot work unless syslog writes to a file.
2018-07-17 11:52:17 +03:00
4162116109 Remove router_options from readwritesplit tests
The router_options parameter is no longer accepted by readwritesplit.
2018-07-17 11:52:16 +03:00
dd8402dd94 Update binlogrouter test configurations
Updated the binlogrouter test configurations to use correct options. Also
removed commented out sections and obsolete configurations.
2018-07-17 11:52:15 +03:00
d51a21faf7 Remove passwd from test configurations
As the parameter will be removed in 2.3, the test configurations need to
be updated.
2018-07-17 11:52:14 +03:00
e2fb0093b1 Merge branch '2.2' into develop 2018-07-12 19:38:40 +03:00
151c7e19f4 Add schemarouter reconfiguration test
Extended the alter_router test to check that modifications to schemarouter
are processed correctly.
2018-07-11 14:08:53 +03:00
6d663c79ac Extend router alteration test
Extended the test to cover modifications to readconnroute as well as do
checks on detection of invalid parameters.

Also allowed modifications to router_options at runtime.
2018-07-11 14:08:52 +03:00
f2e44eb5e2 Add missing newline to mysqlmon stress test assertions
The tests did not add a new line to the assertion output which would
explain why no output from the test itself was given.
2018-07-11 14:08:50 +03:00
616fb30818 Add basic router alteration test
The test checks that alterations to routers work and are persisted.
2018-07-11 14:08:49 +03:00
881c49c57d Fix mxs729_maxadmin
The results returned appear to be inverted with C++11 version of an
unordered map.
2018-07-11 14:08:47 +03:00
86cdb14286 Don't process queued commands when replaying transaction
If a transaction is replayed, queued commands must not be processed. The
exception to this rule is when pending session commands are executed
before the first statement in the replayed transaction is executed.
2018-07-11 14:08:47 +03:00
0614ff4c9d Fix handling of transactions with large results
If transaction replaying was enabled and a result was returned in more
than one call to clientReply, a NULL value would be added to the statement
which in turn would trigger a debug assertion.

Similarly any following statements in the transaction would be executed
regardless of whether the result was complete.

Renamed the statement execution function to better describe what it does.

Extended the basic functional test case to cover this.
2018-07-11 14:08:47 +03:00
222aa9c277 Expect mxs1958_insert_priv to fail
The test should fail as it hasn't been fixed yet.
2018-07-09 15:29:13 +03:00
5b9da16518 Fix order of parameters in mxs1507_migrate_trx
The switchover parameters were given in the wrong order.
2018-07-09 12:10:36 +03:00
b4174cba44 Wait for monitor in mxs1507_migrate_trx
The five second sleep was not adequate and replacing it with monitor
waiting should improve stability.
2018-07-09 12:10:36 +03:00
5c4926b899 Use C++11 RNG in mysqlmon tests
The glib re-entrant random number generation functions crashe on CentOS 7
for no apparent reason. As the C++11 random number library provides a more
versatile, widely supported and simple method of acquiring random numbers,
it should be used instead.
2018-07-09 12:10:36 +03:00
8470da9313 Fix failing tests
Changed mxs1719 to expect a failure with the query and added monitor waits
to mxs359_read_only.
2018-07-09 12:06:48 +03:00
40d076b4ce MXS-1849 Fix broken test to work with new schemarouter 2018-07-09 12:00:40 +03:00
89e83fab4b MXS-1849 Add basic test case 2018-07-09 11:55:54 +03:00
4a215b9ca2 MXS-1961: Add test case
Added a test case that reproduces the problem.
2018-07-07 09:28:50 +03:00
bfd3d2975d Merge branch '2.2' into develop 2018-07-06 14:56:19 +03:00
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
702f8aaed4 Merge branch '2.2' into develop 2018-07-05 13:53:14 +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
2e88ce4132 Merge branch '2.2' into develop 2018-07-04 22:01:01 +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
44ef4912e8 Merge branch '2.2' into develop 2018-07-03 21:13:41 +03:00
b98c0841b4 Enable and fix -Wextra warnings
Fixed all warnings that were present with -Wextra.
2018-07-03 15:07:19 +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
df3deb25cb Clean up mxs812_1
Use stack allocated objects, reduce the iteration count and the amount of
sent data (now roughly 10MB in total).
2018-07-02 13:29:20 +03:00
0911c664b1 MXS-1549: Add basic test case
Added a basic test case that checks that the functionality works as
expected.
2018-07-02 13:29:19 +03:00
56f274d74a Add Connection helper class
This is intended to make querying a "server" easier by wrapping common
functionality into one class.
2018-07-02 13:29:19 +03:00
ccdbfa8997 Fix test compilation failures
The tests failed to compile due to invalid use of try_query. For some
reason this wasn't detected by newer compilers.

Also fixed the compilation failure of mxs1713_lots_of_database on CentOS
7.
2018-07-02 12:45:57 +03:00
ee98ce1ee8 Expand mxs1507_trx_replay
Handle the problematic transaction with session command as well as empty
transactions. Also changed test to use wait_for_monitor as well as pass
the value to check as a parameter to the `check` function.
2018-06-30 19:26:23 +03:00
9737962add Add printf attribute to all variadic functions
The test methods that take printf style input now have the printf
attribute. This enables format checks making oversights less likely.

Also fixed any existing errors in the code. Only the one in
test_binlog_fnc.cpp would've had an actual effect.
2018-06-30 19:26:23 +03:00
dc4a555c70 Merge branch '2.2' into develop 2018-06-28 10:34:41 +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
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
b8e0c31872 Merge branch '2.2' into develop 2018-06-25 09:37:18 +03:00
249e66756f Fix run_session_hang.sh
The script it called used the wrong variable name.
2018-06-22 13:59:57 +03:00
2c5dacf9ae Clean up mxs314
Removed excessive output, used stack allocated objects, simplified
assertions.
2018-06-22 13:59:57 +03:00
3d8f946e19 Take dump_stacktrace into use
MaxScale and tests now both use the same code to dump stacktraces.
2018-06-22 13:59:57 +03:00
be853a448c Link tests against maxutils
The tests now link against the maxutils libraries. Currently, the maxutils
libraries consist of only the maxbase library.
2018-06-22 13:59:57 +03:00