1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

[misc] test improvement

* adding SkySQL HA to test suite
* test server build 10.6
* test maxscale 2.5.3
This commit is contained in:
kolzeq
2021-01-19 10:23:14 +01:00
parent ef3d315796
commit 29fc3bc7bd
22 changed files with 855 additions and 317 deletions

View File

@@ -39,6 +39,7 @@ static int test_bug28075(MYSQL *mysql)
int rc;
SKIP_SKYSQL;
SKIP_MAXSCALE;
rc= mysql_dump_debug_info(mysql);
check_mysql_rc(rc, mysql);
@@ -172,6 +173,7 @@ static int bug31418_impl()
static int test_bug31418(MYSQL *unused __attribute__((unused)))
{
SKIP_MAXSCALE;
int i;
if (!is_mariadb)
@@ -806,12 +808,15 @@ static int test_bug49694(MYSQL *mysql)
static int test_conc49(MYSQL *mysql)
{
SKIP_LOAD_INFILE_DISABLE;
SKIP_SKYSQL;
int rc;
MYSQL_RES *res;
int i;
FILE *fp;
SKIP_SKYSQL;
fp= fopen("./sample.csv", "w");
for (i=1; i < 4; i++)
fprintf(fp, "\"%d\", \"%d\", \"%d\"\r\n", i, i, i);
@@ -983,6 +988,7 @@ static int test_conc_114(MYSQL *mysql)
/* run with valgrind */
static int test_conc117(MYSQL *unused __attribute__((unused)))
{
SKIP_MAXSCALE;
my_bool reconnect= 1;
MYSQL *my= mysql_init(NULL);
FAIL_IF(!my_test_connect(my, hostname, username, password, schema,
@@ -1000,6 +1006,7 @@ static int test_conc117(MYSQL *unused __attribute__((unused)))
static int test_read_timeout(MYSQL *unused __attribute__((unused)))
{
SKIP_MAXSCALE;
int timeout= 5, rc;
MYSQL *my= mysql_init(NULL);
mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout);
@@ -1206,12 +1213,12 @@ static int test_server_status(MYSQL *mysql)
{
int rc;
unsigned int server_status;
MYSQL_STMT *stmt;
// MYSQL_STMT *stmt;
if (mysql_get_server_version(mysql) < 100200)
return SKIP;
stmt= mysql_stmt_init(mysql);
// stmt= mysql_stmt_init(mysql);
rc= mysql_autocommit(mysql, 1);
mariadb_get_infov(mysql, MARIADB_CONNECTION_SERVER_STATUS, &server_status);
@@ -1252,7 +1259,7 @@ static int test_server_status(MYSQL *mysql)
rc= mysql_select_db(mysql, schema);
check_mysql_rc(rc, mysql);
mysql_stmt_close(stmt);
// mysql_stmt_close(stmt);
return OK;
}
@@ -1478,7 +1485,7 @@ struct my_tests_st my_tests[] = {
{"test_conc117", test_conc117, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc_114", test_conc_114, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_connect_attrs", test_connect_attrs, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc49", test_conc49, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc49", test_conc49, TEST_CONNECTION_NEW, 0, NULL, NULL},
{"test_bug28075", test_bug28075, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_bug28505", test_bug28505, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_debug_example", test_debug_example, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},