Commit Graph

435 Commits

Author SHA1 Message Date
8be898d1d3 Disable multi-MaxScale initialization by default
Only tests that require multiple MaxScale instances should enable the
multi-MaxScale mode.
2017-10-12 12:29:43 +03:00
81dba9767c Order member variable initialization in TestConnections
The variables are now initialized in order and always in the constructor.
2017-10-12 12:29:43 +03:00
7b261ac99d Use absolute paths in kerberos_setup
The files were located in the vagrant user's home directory but superuser
access is needed to copy them into /etc.
2017-10-12 12:29:43 +03:00
e58f6d6317 Add methods for changing the active MaxScale instance
The new function allows two MaxScale instances to be controlled via the
same TestConnections object. This will allow testing of Maxscale clusters.
2017-10-12 12:29:43 +03:00
65b4612ff4 Run smoke tests by default
The tests are now run as the shorter version by default.
2017-10-12 12:29:43 +03:00
1521bae3b5 Use new MaxScale object names in mxs1457_ignore_deleted
The names of the monitors and services in tests that use MaxScale 2.2 need
to use the hyphen-transformed versions of the object names.
2017-10-12 12:29:43 +03:00
8a55bbfca8 Fix typo in IP testing database
The test had a typo in the SQL that created the database so the later
queries that referred to it always failed.
2017-10-12 12:29:43 +03:00
e94dc2aade MXS-1468: Add test case
Added test case that reproduces the bug.
2017-10-11 11:29:02 +03:00
6b7ccea4e3 Fix large_insert_hang compilation failure
Added missing changes that weren't added to last commit.
2017-10-09 16:01:40 +03:00
ede52c8af9 Add OK packet processing test
Added a test case which exercises the OK packet handling in
readwritesplit.
2017-10-09 14:05:38 +03:00
75316712e7 Fix error messages in sync_slaves
Fixed missing newlines in the error output printf calls of
sync_slaves. Changed the order of commands pers_02 executes to a more
correct way.
2017-10-08 23:26:22 +03:00
bbd5fe8288 Fix GTID setup in tests
The GTID setup in tests executed code that was not supposed to be executed
when GTID is in use.
2017-10-05 11:09:09 +03:00
d391db6c2a Fix sync_slaves
The function did not check whether the file name was valid.
2017-10-05 08:23:01 +03:00
8159798d85 Clean up setup_binlog_gtid
Removed redundant operations and cleaned up unused code.
2017-10-05 08:14:39 +03:00
0cb72937cd Disable multi-MaxScale initialization by default
Only tests that require multiple MaxScale instances should enable the
multi-MaxScale mode.
2017-10-05 08:09:58 +03:00
a4271cb94e Order member variable initialization in TestConnections
The variables are now initialized in order and always in the constructor.
2017-10-05 08:06:10 +03:00
da2201d16c Use absolute paths in kerberos_setup
The files were located in the vagrant user's home directory but superuser
access is needed to copy them into /etc.
2017-10-04 12:16:01 +03:00
503e768d80 Add methods for changing the active MaxScale instance
The new function allows two MaxScale instances to be controlled via the
same TestConnections object. This will allow testing of Maxscale clusters.
2017-10-04 10:57:12 +03:00
9f74878794 Run smoke tests by default
The tests are now run as the shorter version by default.
2017-10-04 10:34:06 +03:00
7dfa1577fc Use new MaxScale object names in mxs1457_ignore_deleted
The names of the monitors and services in tests that use MaxScale 2.2 need
to use the hyphen-transformed versions of the object names.
2017-10-04 09:02:40 +03:00
9f66278ac2 Fix typo in IP testing database
The test had a typo in the SQL that created the database so the later
queries that referred to it always failed.
2017-10-03 22:32:56 +03:00
54a7051a3f Fix tests broken by the merge
The merge caused compilation failures in two of the files.
2017-10-03 15:14:06 +03:00
bd39284f9c Merge branch '2.1' into 2.2 2017-10-03 14:30:06 +03:00
0cd62c6f29 Make bug509 more Galera friendly
The test now skips execution of inserts to separate nodes. This should
guarantee that the nodes are synced at all times.

The test now does the inserts and selects inside a transaction to force
the reads to the same node where the inserts are done.
2017-10-02 11:50:55 +03:00
4f675997fb Use correct binlog position in mm_mysqlmon
Position 310 is not guaranteed to always exist on the master if the binlog
is just created. Position 4 will always be a valid position.
2017-10-02 11:22:13 +03:00
6a33e55b6f Backport no_vm_revert option
The VM revert on test failure was added to 2.1 but it was only disabled in
2.2.
2017-10-02 10:55:00 +03:00
6f84f960ff Add fatal signal hanlder to TestConnections
The tests now print a stack trace to standard output if it receives a
fatal signal. This will help debug test failures caused by broken tests
and unexpected results.
2017-10-02 10:32:46 +03:00
1fd50222f8 Remove .secrets on test startup
The `.secrets` file does not match shell globbing by default so it should
be explicitly removed.
2017-10-02 10:01:54 +03:00
d3acb9573f Do minor improvements to monitor tests
The mm test was on the heavy side and the workload can be reduced for the
sake of testing only the functionality.

The mm_mysqlmon test did not check the initial state of the
server. Although not necessary, adding it will help detect test failures
caused by broken replication.

mxs1457_ignore_deleted did not stop the monitors before breaking the
replication and attempting to use MaxScale. As the test expects
authentication to work regardless of the actual state of the servers, the
monitors need to be disabled before a query is attempted.
2017-10-02 00:49:17 +03:00
af08647fa2 Add variadic ssh function to mariadb_nodes
The ssh_node function now supports printf style arguments. This is used to
simplify command execution on the nodes.

Curreltny, in addition to its old usage, it is used to drop extra
databases when replication is started.
2017-10-01 10:49:11 +03:00
27ccf0877c Fix bug in the cdc_connector
The cdc_connector did not check if the data request was successful.
2017-09-29 21:11:12 +03:00
5b0b1666cc Fix bug649
The `Test` is a pointer.
2017-09-28 10:39:37 +03:00
099c2f87bc MXS-1457: Add test case
Added a test that reproduces the problem.
2017-09-27 19:28:05 +03:00
3922f7a901 Enable tee filter tests for 2.2
Enabled the tests that were accidentally disabled and cleaned up some of
the redundant code in bug649.
2017-09-27 19:26:05 +03:00
2633ad2fe4 Merge branch '2.1' into 2.2 2017-09-26 14:29:14 +03:00
753c61997d MXS-1451: Expand test case
The test now checks that both users with passwords and users without
passwords work through MaxScale when skip_authentication is enabled. In
addition to this, the test also makes sure that the wrong password and a
missing password are properly detected.
2017-09-26 07:48:45 +03:00
2079bba49c MXS-1451: Calculate password even with skip_authentication=true
The result of the authentication should be ignored but the scramble that
is calculated as a side-effect still needs to be stored. This can be done
by altering the SQL used to get the matching row to only match on the
username, not the network address.

Also expanded the test case to cover the use of bad credentials.
2017-09-25 19:00:44 +03:00
6601f15ff8 MXS-1451: Add test case
Added test case for MXS-1451 that reproduces the problem.
2017-09-25 13:27:55 +03:00
551bfb6f26 Merge branch '2.1' into 2.2 2017-09-25 12:35:11 +03:00
18b0d3575e Speed up binlog tests
The binlogrouter tests can safely use the sync_slaves functionality of the
test framework as long as a sensible timeout is used.

Cleaned up the tests by removing redundant code and allocating classes
from the stack thus removing the need to handle memory allocation.
2017-09-25 10:46:55 +03:00
9f31b746a0 Create rules directory in mxs1110_16mb
The test uses the dbfwfilter but it does not create the directory where
the rules are stored.
2017-09-25 10:46:55 +03:00
14920fef6c Enable info log for mxs1110_16mb
The info log should help resolve why MaxScale crashes with a debug
assertion.
2017-09-25 10:46:55 +03:00
b1859cc7a5 Speed up lots_of_rows
The test inserted 200k rows with autocommit enabled which made it very
slow. Wrapping the inserts inside a transaction gives the test a
significant speed boost.
2017-09-25 10:46:55 +03:00
54f4c6ff73 Clean up binlog_semisync
Removed unnecessary newlines and for loops that were executed only once.
2017-09-25 10:46:55 +03:00
ba47d80efa Only test edge cases in different_size tests
The tests should only test the cases when the payload size changes the
number of packets the query generates. This involves generating only one
packet, one full packet and one partial packet and one full packet and one
empty packet. These cases should cover all reasonable edge cases and
further testing doesn't seem to provide any significant benefit.
2017-09-25 10:46:55 +03:00
eb0f8ef25d Drop unused databases
The test code should drop any databases that it creates. Also fixed the
typo in the database name.
2017-09-21 09:42:38 +03:00
595827f9f0 Clean up pers_01 test
The test used an unnecessary timeout in places where one is not
expected. It also restarted MaxScale with no apparent reason.
2017-09-21 09:36:50 +03:00
cda1fdc26a Refactor fwf_syntax
Use stack allocated classes, check return value of the start command and
combine the rule creation function.
2017-09-21 09:36:50 +03:00
049eb68254 Combine redundant dbfwfilter tests
The fwf test now only tests the functionality of the rules themselves, not
the parsing. The fwf_syntax test handles the testing of the parser. The
fwf2 test was removed as it was almost identical with the original fwf
test.
2017-09-21 09:36:50 +03:00
773bae1615 Speed up testing
Removed unnecessary sleeps from tests that appear to serve no
purpose. Moveed the kerberos code from the general startup routines to the
kerberos test.
2017-09-21 09:36:50 +03:00