Merge pull request #29565 from taosdata/fix/main/TD-33523

fix[TD-33523]async problem in unit test
This commit is contained in:
Shengliang Guan 2025-01-14 15:35:22 +08:00 committed by GitHub
commit 6f7533f4d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -197,7 +197,7 @@ void do_stmt(TAOS* taos, TAOS_STMT2_OPTION* option, const char* sql, int CTB_NUM
checkError(stmt, code);
// exec
int affected;
int affected = 0;
code = taos_stmt2_exec(stmt, &affected);
total_affected += affected;
checkError(stmt, code);
@ -219,8 +219,9 @@ void do_stmt(TAOS* taos, TAOS_STMT2_OPTION* option, const char* sql, int CTB_NUM
taosMemoryFree(tags);
}
}
if (option->asyncExecFn == NULL) {
ASSERT_EQ(total_affected, CYC_NUMS * ROW_NUMS * CTB_NUMS);
}
for (int i = 0; i < CTB_NUMS; i++) {
taosMemoryFree(tbs[i]);
}