fix:[TD-32642] test case error if multi connections

This commit is contained in:
yihaoDeng 2024-12-11 16:05:40 +08:00
parent 4a3eda51e0
commit 942151be05
1 changed files with 5 additions and 5 deletions

View File

@ -299,8 +299,8 @@ TEST(connectionCase, setConnectionOption_Test) {
taosMsleep(2 * HEARTBEAT_INTERVAL);
//test user APP and user IP
check_sql_result(pConn, "select user_app from performance_schema.perf_connections", "aaaaaaaaaaaaaaaaaaaaaab");
check_sql_result(pConn, "select user_ip from performance_schema.perf_connections", "192.168.0.2");
check_sql_result_integer(pConn, "select count(*) from performance_schema.perf_connections where user_app = 'aaaaaaaaaaaaaaaaaaaaaab'", 1);
check_sql_result_integer(pConn, "select count(*) from performance_schema.perf_connections where user_ip = '192.168.0.2'", 1);
code = taos_options_connection(pConn, TSDB_OPTION_CONNECTION_USER_IP, "192.168.1.2");
ASSERT(code == 0);
@ -313,9 +313,8 @@ TEST(connectionCase, setConnectionOption_Test) {
taosMsleep(2 * HEARTBEAT_INTERVAL);
check_sql_result(pConn, "select user_app from performance_schema.perf_connections", "user");
check_sql_result(pConn, "select user_ip from performance_schema.perf_connections", "192.168.1.2");
check_sql_result_integer(pConn, "select count(*) from performance_schema.perf_connections where user_app = 'user'", 1);
check_sql_result_integer(pConn, "select count(*) from performance_schema.perf_connections where user_ip = '192.168.1.2'", 1);
// test clear
code = taos_options_connection(pConn, TSDB_OPTION_CONNECTION_CLEAR, "192.168.0.2");
@ -944,3 +943,4 @@ TEST(timezoneCase, localtime_performance_Test) {
#endif
#pragma GCC diagnostic pop