From 5000bc790a09b98aa40c229f3318cb4557e880b2 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Thu, 10 Aug 2023 11:18:22 +0200 Subject: [PATCH] Test fix: Always specify the socketname when calling my_test_connect(). --- unittest/libmariadb/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 5a099d44..9fa3212b 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -648,7 +648,7 @@ int test_conc26(MYSQL *unused __attribute__((unused))) MYSQL *mysql= mysql_init(NULL); mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "utf8"); - FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, NULL, CLIENT_REMEMBER_OPTIONS), + FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, socketname, CLIENT_REMEMBER_OPTIONS), "Error expected"); FAIL_IF(!mysql->options.charset_name || strcmp(mysql->options.charset_name, "utf8") != 0, @@ -656,7 +656,7 @@ int test_conc26(MYSQL *unused __attribute__((unused))) mysql_close(mysql); mysql= mysql_init(NULL); - FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, NULL, 0), + FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, socketname, 0), "Error expected"); FAIL_IF(mysql->options.charset_name, "Error: options not freed"); mysql_close(mysql); @@ -671,7 +671,7 @@ int test_connection_timeout(MYSQL *unused __attribute__((unused))) MYSQL *mysql= mysql_init(NULL); mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (unsigned int *)&timeout); start= time(NULL); - if (my_test_connect(mysql, "192.168.1.101", "notexistinguser", "password", schema, port, NULL, CLIENT_REMEMBER_OPTIONS)) + if (my_test_connect(mysql, "192.168.1.101", "notexistinguser", "password", schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) { diag("Error expected - maybe you have to change hostname"); return FAIL; @@ -697,7 +697,7 @@ int test_connection_timeout2(MYSQL *unused __attribute__((unused))) mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (unsigned int *)&timeout); mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=SLEEP(7)"); start= time(NULL); - if (my_test_connect(mysql, hostname, username, password, schema, port, NULL, CLIENT_REMEMBER_OPTIONS)) + if (my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) { elapsed= time(NULL) - start; diag("elapsed: %lu", (unsigned long)elapsed);