
commit 48a0b902b67da46f1eed4afa687bdcb56b59d02f Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Mon Dec 16 15:35:07 2019 +0200 Increase timouts in the mxs173_trottle_filter test commit 81d8083a89421a8004b8024d480ae0f35d715b86 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Mon Dec 16 14:19:39 2019 +0200 Increase timeouts in max1071_maxrow test commit e1039c6132f0e9274b8801165f3f905ede7c9421 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Mon Dec 16 00:06:53 2019 +0200 Remove hardcoded 'home/vagrant/' from all maxscale.cnf in system tests commit 28c8029e060afdcf5159bf802b13dcd5e484d9f1 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sun Dec 15 21:31:34 2019 +0200 Use private IP for Galera congiguration in maxscale-system-tests commit 66dc36cbf43a5fb92465df31e1295e82865be1fc Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sun Dec 15 09:06:28 2019 +0200 Fix typos in fwf_*.cpp commit 44c7a4384ddf39596c0254c955aeb6c008a00a35 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sun Dec 15 09:05:26 2019 +0200 Fix typos in fwf_*.cpp commit 2649017611908a8b0d27090f49722947ac31c4f4 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sun Dec 15 09:03:41 2019 +0200 Fix typos in fwf_*.cpp commit 5cc87658523e8496eaab17700be8a821af5b0cde Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sat Dec 14 23:54:53 2019 +0200 Fix typo in fwf_copy_rules.cpp commit fb1accc36cb9d79691469f63cb4535f3bc38dedd Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sat Dec 14 23:52:51 2019 +0200 More hardcoded 'vagrant' removals commit 77e49d474b4abe767629ff87b01f08137773d761 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sat Dec 14 23:35:09 2019 +0200 Fix hardcoded 'vagrant' user in fwf* tests Several firewall filter tests has hardcoded 'vagrant' as a user name for access user on the VM. Changed to node->access_user. commit ed5ab1487f37822db6a7478f76c0f3652776c389 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sat Dec 14 22:50:35 2019 +0200 Fix IP vs IP_private Many tests use IP instead of IP_private which makes them failed in the AWS or GCloud environment. The same applies to get_conn_num() etc functions. commit 0558aac23d303a675dc12d05b1766e698753b444 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Thu Aug 15 12:02:01 2019 +0300 fix IP -> IP_private for some mysqlmon* testst commit 5d9c70970d970eb995c8774d0088bd1c54ab76fe Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Sat Dec 14 20:20:51 2019 +0200 Replace IP to IP_private in the maxscale-system-tests commit b06cf3329af59ff100748691991213fe639f29e6 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Tue Nov 19 11:52:33 2019 +0200 Remove spaces from value which were read from *_network_config MDBCI can put spaces around values in the *_network_config file which can cause ssh connection failures in the tests. To fix it removing all spaces from all values which were read from *_network_config commit b3904f019847ef1db9d4ec9714ad9ef869fa0b01 Author: Timofey Turenko <timofey.turenko@mariadb.com> Date: Thu Dec 12 23:36:31 2019 +0200 Increate default timeout for all system tests
115 lines
3.3 KiB
C++
115 lines
3.3 KiB
C++
/*
|
|
* Copyright (c) 2016 MariaDB Corporation Ab
|
|
*
|
|
* Use of this software is governed by the Business Source License included
|
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
|
*
|
|
* Change Date: 2023-10-29
|
|
*
|
|
* On the date above, in accordance with the Business Source License, use
|
|
* of this software will be governed by version 2 or later of the General
|
|
* Public License.
|
|
*/
|
|
|
|
#include <iostream>
|
|
#include "testconnections.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace
|
|
{
|
|
|
|
void init(TestConnections& test)
|
|
{
|
|
MYSQL* pMysql = test.maxscales->conn_rwsplit[0];
|
|
|
|
test.try_query(pMysql, "DROP TABLE IF EXISTS MXS_1719");
|
|
test.try_query(pMysql, "CREATE TABLE MXS_1719 (a TEXT, b TEXT)");
|
|
test.try_query(pMysql, "INSERT INTO MXS_1719 VALUES (1, 1)");
|
|
}
|
|
|
|
void run(TestConnections& test)
|
|
{
|
|
init(test);
|
|
|
|
MYSQL* pMysql = mysql_init(NULL);
|
|
test.expect(pMysql, "Could not create MYSQL handle.");
|
|
|
|
const char* zUser = test.maxscales->user_name;
|
|
const char* zPassword = test.maxscales->password;
|
|
int port = test.maxscales->rwsplit_port[0];
|
|
|
|
if (mysql_real_connect(pMysql,
|
|
test.maxscales->IP[0],
|
|
zUser,
|
|
zPassword,
|
|
"test",
|
|
port,
|
|
NULL,
|
|
CLIENT_MULTI_STATEMENTS))
|
|
{
|
|
const char* q = "UPDATE MXS_1719 SET a=1; UPDATE MXS_1719 SET a=1;";
|
|
// One multi-statement with two UPDATEs. Note: This query should fail
|
|
// with 2.3 now that function blocking has been added
|
|
test.expect(execute_query_silent(pMysql, q) != 0, "Query '%s' should not succeed", q);
|
|
|
|
// Sleep a while, so that the log is flushed.
|
|
sleep(5);
|
|
// This is actually related to MXS-1861 "masking filter logs warnings with
|
|
// multistatements" but it seems excessive to create a specific test for that.
|
|
test.log_excludes(0, "Received data, although expected nothing");
|
|
|
|
// This will hang immediately, so we can shorten the timeout.
|
|
test.set_timeout(5);
|
|
test.try_query(pMysql, "SELECT * FROM MXS_1719");
|
|
test.stop_timeout();
|
|
}
|
|
else
|
|
{
|
|
test.expect(false, "Could not connect to MaxScale.");
|
|
}
|
|
}
|
|
}
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
TestConnections::skip_maxscale_start(true);
|
|
|
|
TestConnections test(argc, argv);
|
|
std::string src = test_dir;
|
|
src += "/mxs1719.json";
|
|
std::string dst = std::string(test.maxscales->access_homedir[0]) + "/mxs1719.json";
|
|
|
|
if (test.maxscales->copy_to_node(0, src.c_str(), dst.c_str()) == 0)
|
|
{
|
|
if (test.maxscales->start() == 0)
|
|
{
|
|
sleep(10);
|
|
test.maxscales->wait_for_monitor();
|
|
|
|
if (test.maxscales->connect_rwsplit() == 0)
|
|
{
|
|
run(test);
|
|
}
|
|
else
|
|
{
|
|
test.expect(false, "Could not connect to RWS.");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
test.expect(false, "Could not start MaxScale.");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
test.expect(false, "Could not copy masking file to MaxScale node.");
|
|
}
|
|
|
|
test.maxscales->connect();
|
|
test.try_query(test.maxscales->conn_rwsplit[0], "DROP TABLE MXS_1719");
|
|
test.maxscales->disconnect();
|
|
|
|
return test.global_result;
|
|
}
|