Commit Graph

435 Commits

Author SHA1 Message Date
6803ca2efc Fix crash in mxs361
The test crashed as it used the wrong result set field.
2017-12-11 12:31:40 +02:00
821d21dafb remove unnecessary 'cd' in run_test_snapsht (#148)
remove unnecessary 'cd' in run_test_snapshot
2017-12-11 12:17:13 +02:00
1ae05f0487 MXS-1514: Fix failover test
Current failover code better detects weird situations and refuses to work in one.
The test server slaves have events far ahead of the master in their binlogs,
causing the failover to stop. To fix this, slave binlogs are now deleted when
a test begins.
2017-12-08 12:39:47 +02:00
3c88bf1ec6 refactored tests (#147) 2017-12-08 12:23:04 +02:00
0ba7bdca81 Update connector-c to 3.0.2 for tests
Updated connector to same version that is used in MaxScale.
2017-12-08 10:39:49 +02:00
7a6d00e807 Cherry-pick test fixes from 2.2
This is a partial cherry-pick of 9f11fdd2c122c9b30548c7ab55df8dda643ec659.

Use larger BLOB type for mxs812_1, the inserted value exceeds the normal
BLOB size.

Add a baseline check into bulk_insert to verify that direct connections
work (at the moment they don't, needs an investigation).

Modified avro_alter to prevent data type conversion errors.
2017-12-07 13:19:06 +02:00
a6a37969e9 fix condition for named test (#146) 2017-12-07 11:57:11 +02:00
8ddd16186e Add .gitignore to maxscale-system-test 2017-12-07 10:44:54 +02:00
50ae8b3826 remove scrit_dir definition from set_env.sh 2017-12-05 15:07:58 +02:00
e1d774f9b3 fix set_env.sh 2017-12-05 13:22:40 +02:00
9f11fdd2c1 Fix test failures
Use larger BLOB type for mxs812_1, the inserted value exceeds the normal
BLOB size.

Add a baseline check into bulk_insert to verify that direct connections
work (at the moment they don't, needs an investigation).

Updated parameter names in failover_mysqlmon_mrm.

Modified avro_alter to prevent data type conversion errors.
2017-12-05 09:43:06 +02:00
f45a011dbe add MDBCI test scripts (#145) 2017-12-05 00:30:30 +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
0506669738 Only refresh users on failed authentication
When backend authentication failed due to errors other than wrong
credentials, the users were unconditionally reloaded. This caused a spike
of activity whenever authentication failed for other reasons.

Also fixed the test that checks for this to look for the correct error
message.
2017-12-01 06:01:18 +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
8a10b72e4d Merge 2.1 in 2.2
Merge 2.1 in 2.2
2017-11-29 11:30:33 +01:00
d69a36b4dd MXS-1476: Stop nodes instead of blocking them
This should actually disrupt the Galera cluster instead of just
temporarily disabling it.
2017-11-27 15:53:54 +02:00
afcb708e6e Merge branch '2.1' into 2.2 2017-11-21 16:49:21 +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
ced93acc20 MXS-1514: Add failover test
The test is composed of a few parts.
1: Test that failover happens on master failure.
2: Test that a server with slave sql thread stopped is not promoted.
3: Test that a server with log_slave_updates=1 is promoted before others.
2017-11-14 10:01:37 +02:00
41f6400852 MXS-1476: Add test case
Test for MXS-1476 that checks that the behavior is what is
expected. Currently, the test passes as behavior is what is expected.
2017-11-13 11:55:54 +02:00
2792f54089 Use explicit script path in test_maxctrl
The path to the script is now explicitly defined. This makes the call
unambiguous as the home directory depends on the current user.
2017-11-10 09:37:51 +02:00
5acdfab5e6 Start MaxScale as maxscale user in run_ctrl_c.sh
MaxScale should not be started as root.
2017-11-09 14:15:47 +02:00
f44020496a Merge branch '2.2' into 2.2-mrm 2017-11-07 12:05:33 +02:00
5db02586b1 Use the external CDC connector
The CDC connector was moved to its own repository and some changes to its
interface were made. Updated build scripts, deleted old connector and
fixed code to use new interfaces.
2017-11-07 12:03:09 +02:00
ce19fe3248 Move Jansson compilation into main test suite
The test suite now compiles Jansson instead of letting the CDC connector
do it. This way the connector can be used as a very simple static library
with a dependency on the Jansson library.
2017-11-07 12:03:09 +02:00
96d9ec1b6d Update the CDC connector
The CDC connector now uses a non-blocking socket for the reads. This
allows the possibility of adding read timeouts.

Added some utility functions for dealing with GTIDs and delayed the
reading of the first row.
2017-11-07 12:03:09 +02:00
43cea6a2fa Reorder linking of libraries
The cdc-connector did not build on Ubuntu Trusty due to the wrong order of
linker flags. Moving the crypt and crypto linkage to be after
cdc-connector appears to fix it.
2017-11-05 11:16:26 +02:00
a294da407a Use the external CDC connector
The CDC connector was moved to its own repository and some changes to its
interface were made. Updated build scripts, deleted old connector and
fixed code to use new interfaces.
2017-11-03 13:39:36 +02:00
f815e9caa5 Move Jansson compilation into main test suite
The test suite now compiles Jansson instead of letting the CDC connector
do it. This way the connector can be used as a very simple static library
with a dependency on the Jansson library.
2017-11-03 13:39:36 +02:00
96e86cddad Update the CDC connector
The CDC connector now uses a non-blocking socket for the reads. This
allows the possibility of adding read timeouts.

Added some utility functions for dealing with GTIDs and delayed the
reading of the first row.
2017-11-03 13:39:36 +02:00
8cac26a14d Merge branch '2.2' into 2.2-mrm 2017-11-02 12:46:00 +02:00
6fc8e9cb21 Add .gitignore to maxscale-system-test 2017-11-02 11:51:32 +02:00
3a78b716b8 Merge branch '2.2' into 2.2-mrm 2017-10-30 11:06:34 +02:00
a971aa25da Merge branch '2.1' into 2.2 2017-10-30 11:01:19 +02:00
37e64bad90 MXS-1493: Add master failure verification test 2017-10-27 15:31:46 +03:00
de800766ef Build the replicaton-manager test
The test wasn't built as it is not a part of the test suite. The
executable should be built but it should not be added to the test suite.

Changed the management script to only add the configuration and added a
call to it at the start of the test.
2017-10-25 14:53:40 +03:00
555aa6d2c8 Fix test crash in sync_slaves
The crash happens if the slave is not configured for replication or the
connection is broken when results are read. Adding missing return value
checks will fix it.
2017-10-24 11:06:14 +03:00
7df5b3d24a Install git in test_maxctrl
Git was not installed in the test. This should not be done in tests but it
is an acceptable short-term workaround.

Also run the script as root.
2017-10-24 11:06:14 +03:00
284cd50412 Bind REST API to localhost by default
Binding to localhost by default is more secure than binding to all
interfaces.
2017-10-23 19:37:21 +03:00
2534c9b824 Update replication-manager test
The test now checks whether replication-manager launched by a script
works. This is closer to how one of the original blog posts define the
setup.
2017-10-12 13:16:12 +03:00
938484a73e Allow remote server to be used for maxctrl test suite
The test suite now works with remote servers and is now fully integrated
to the regression test suite.
2017-10-12 13:16:12 +03: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
958e9cc2b0 Fix large_insert_hang compilation failure
Added missing changes that weren't added to last commit.
2017-10-12 12:29:43 +03:00
f2afa5380b Add OK packet processing test
Added a test case which exercises the OK packet handling in
readwritesplit.
2017-10-12 12:29:43 +03:00
621444e5e4 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-12 12:29:43 +03:00
5521c84258 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-12 12:29:43 +03:00
fa25f5aba8 Fix sync_slaves
The function did not check whether the file name was valid.
2017-10-12 12:29:43 +03:00
16530b4a97 Clean up setup_binlog_gtid
Removed redundant operations and cleaned up unused code.
2017-10-12 12:29:43 +03:00