From 003b5cd168c97ddee3878005dfd6426b514b6fd7 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Sun, 15 Jan 2023 17:41:29 +0100 Subject: [PATCH] Follow up for CONC-622 test: Host 0.0.0.0 is mapped to locahost, so we need another invalid host address (1.0.0.0) instead and reduce the number of loops. --- unittest/libmariadb/async.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unittest/libmariadb/async.c b/unittest/libmariadb/async.c index 5f9ca23b..bc6beaff 100644 --- a/unittest/libmariadb/async.c +++ b/unittest/libmariadb/async.c @@ -255,11 +255,12 @@ static int test_conc622(MYSQL *my __attribute__((unused))) int status; uint default_timeout; int i; + const char *invalid_host= "1.0.0.0"; if (skip_async) return SKIP; - for (i=0; i < 100; i++) + for (i=0; i < 5; i++) { mysql_init(&mysql); rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); @@ -273,7 +274,7 @@ static int test_conc622(MYSQL *my __attribute__((unused))) mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "myapp"); /* Returns 0 when done, else flag for what to wait for when need to block. */ - status= mysql_real_connect_start(&ret, &mysql, "0.0.0.0", username, password, schema, port, socketname, 0); + status= mysql_real_connect_start(&ret, &mysql, invalid_host, username, password, schema, port, socketname, 0); while (status) { status= wait_for_mysql(&mysql, status); @@ -288,7 +289,8 @@ static int test_conc622(MYSQL *my __attribute__((unused))) status= mysql_close_cont(&mysql, status); } } else { - diag("Expected error when connection to host '0.0.0.0'"); + diag("Expected error when connecting to host '%s'", invalid_host); + diag("Connected to %s", mysql_get_server_info(&mysql)); return FAIL; } }