Commit Graph

45 Commits

Author SHA1 Message Date
bed0b850b1 Merge branch '2.1' into 2.2 2018-01-05 09:58:10 +02:00
1bd20cd2eb temopary disable snapshot revert due to Galera failures 2018-01-05 09:40:41 +02:00
3b7275ec41 Use default value for "smoke"
The values should only be updated if the environment variable is defined.
2017-12-27 17:21:42 +02:00
58373b3495 Fix template generation
The templates weren't generated for Galera nodes.
2017-12-27 09:42:21 +02:00
5c7845c381 Galera startup crash fix, temporal removal of revert snapshot (Galera does not survive revert)
and add cores saving from tests themselves.
2017-12-21 17:20:41 +02:00
70088be16d Use default value for "smoke"
The values should only be updated if the environment variable is defined.
2017-12-19 16:44:46 +02:00
c3fe8a6b55 MXS-1565: Invalid rejoin test
- 1 master, 3 slaves
- stop maxscale so it does not autorejoin later on
- stop & reset slave on servers 3 & 4
- add data to server 4
- restart maxscale, check that server 3 is rejoined but not server 4
- manually set server 1 to replicate from server 4, creating a relay master
- check that servers 2 & 3 are redirected, making server 1 just a slave
- switchover master to server 1, check that it's the master

Also, moved some common functions into their own files. These functions
are used by multiple tests.
2017-12-19 15:59:01 +02:00
628203213e Fix template generation
The templates weren't generated for Galera nodes.
2017-12-19 15:00:39 +02:00
1006ec506a 2.2 fix restore (#152)
* refactor test backend fixing

* return comatibility with 5.5 for backend restore

* remove backend configuration scripts

* adopt test backed restore function for 2.2 test fw
2017-12-18 23:47:07 +02:00
1a63e5ec7e 2.1 fix restore (#151)
* refactor test backend fixing

* return comatibility with 5.5 for backend restore

* remove backend configuration scripts
2017-12-18 23:47:02 +02:00
6d3e165bb0 fix log copying in Testconnections 2017-12-12 18:34:06 +02:00
dde85af83b Clean up mariadb_func.h
Combined functions into one which only used different default
values. Removed unused functions. Used std::string where possible to make
their usage easier. Hid code that isn't used externally.
2017-12-12 16:36:51 +02:00
79afaa447e Merge branch '2.1' into 2.2 2017-12-12 13:23:02 +02:00
3c88bf1ec6 refactored tests (#147) 2017-12-08 12:23:04 +02:00
277ece53d0 Add assertion function to TestConnections
The TestConnections::assert behaves much like the normal assert function
by simply inverting the check for add_result.
2017-12-04 14:49:13 +02:00
016b0f69f7 MXS-1509: Initial implementation of test case
Added some code to detect server states in a consistent manner and created
the test. The multi-source replication appeared to cause problems for the
test system which needs to be resolved.

Added --force flags to most direct `mysql` calls to prevent errors from
stopping the processing of remaining commands.
2017-11-30 12:39:00 +02:00
fca11f992a Fix verify_master_failure
The test expected the wrong error message to be in the log. To better cope
with changes in the text, the test now uses a regular expression to do the
matching.
2017-11-14 16:53:09 +02:00
47b1004134 Add proper cluster testing scripts
The scripts start MaxScale processes on two different servers. The support
framework for the tests is in place but the tests themselves still need to
be modified to allow the use of non-localhost addresses.
2017-10-12 13:16:12 +03:00
9617b55905 Run MaxCtrl test suite in the regression test suite
The MaxCtrl test suite is now a part of the regression test suite. The
cluster tests are expected to fail as that is yet to be implemented.

Also fixed the return value of TestConnections::ssh_maxscale.
2017-10-12 13:16:12 +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
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
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
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
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
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
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
20bfe16d11 Remove unnecessary sleeps
Every time MaxScale was restarted, the test waited for a total of 25
seconds. As MaxScale should start before the command returns, the sleep is
not necessary.

Added StartLimitBurst=0 to the systemd service file to allow rapid
restarts of MaxScale.
2017-09-21 09:36:50 +03:00
c794af1f47 Mxs 1355 (#138)
* add binlog test with gtid

* removing ;

* restore test to initial state with check_sha1()

* remove reset master

* make no_vm_revert true by dafault
2017-08-24 12:21:29 +03:00
f95fff6632 Stop replication before configuring binlogrouter
The replication needs to be stopped before the binlogrouter is started. If
the replication is stopped after this, it is possible that two servers
with the same value of server_id attempt to register as slaves which
causes the later of them to fail.
2017-07-31 09:42:03 +03:00
174dad4b5b Fix master server version checks in tests
The master server version was not processed adequately and false positives
of old master versions were possible.
2017-07-31 09:42:03 +03:00
af99ab3b72 Print the JSON in avro_alter
The test now prints the output in avro_alter. The replicate_from_master
function also stops maxscale before removing the files.
2017-07-31 09:42:03 +03:00
563fdb4db5 Backport testing fixes to 2.1
Some of the testing fixes weren't included into 2.1 and due to that, a few
of the tests appear to fail.
2017-07-27 09:26:27 +03:00
61cfd92510 Stop replication before configuring binlogrouter
The replication needs to be stopped before the binlogrouter is started. If
the replication is stopped after this, it is possible that two servers
with the same value of server_id attempt to register as slaves which
causes the later of them to fail.
2017-07-06 13:54:59 +03:00
22d47aab52 Print the JSON in avro_alter
The test now prints the output in avro_alter. The replicate_from_master
function also stops maxscale before removing the files.
2017-07-06 13:31:38 +03:00
5a26d17fcf Fix master server version checks in tests
The master server version was not processed adequately and false positives
of old master versions were possible.
2017-07-03 17:08:39 +03:00
cb57e10761 Develop merge
Develop merge
2017-06-29 15:34:22 +02:00
5351c6c4a9 Fix test compile warnings
A const char pointer was passed as a parameter to a function that used
char pointers.
2017-06-17 08:55:09 +03:00
b20334e09e Make avrorouter testing faster
The slave part of the binlogrouter replication can be ignored for
avrorouter tests. This will speed up the testing by skipping the
unnecessary restarting and configuration of slave servers.
2017-06-05 13:17:16 +03:00
d7d4ec29bb Add tests from develop
Added tests from develop. The test results need to be modified for 2.0.
2017-05-26 15:40:40 +03:00