From e5750e1219b2f9aa316a0f455e7177e60e9397a4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 18 Jul 2023 18:30:10 +0800 Subject: [PATCH] test(stream): update a test case. --- source/client/test/clientTests.cpp | 37 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 3c46d17802..a7cf599a26 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -899,13 +899,40 @@ TEST(clientCase, agg_query_tables) { } taos_free_result(pRes); - pRes = taos_query(pConn, "show table distributed tup"); - if (taos_errno(pRes) != 0) { - printf("failed to select from table, reason:%s\n", taos_errstr(pRes)); - taos_free_result(pRes); - ASSERT_TRUE(false); + int64_t st = 1685959293000; + for (int32_t i = 0; i < 10000000; ++i) { + char s[256] = {0}; + + while (1) { + sprintf(s, "insert into t1 values(%ld, %d)", st + i, i); + pRes = taos_query(pConn, s); + + int32_t ret = taos_errno(pRes); + taos_free_result(pRes); + if (ret == 0) { + break; + } + } + + while (1) { + sprintf(s, "insert into t2 values(%ld, %d)", st + i, i); + pRes = taos_query(pConn, s); + int32_t ret = taos_errno(pRes); + + taos_free_result(pRes); + if (ret == 0) { + break; + } + } } +// pRes = taos_query(pConn, "show table distributed tup"); +// if (taos_errno(pRes) != 0) { +// printf("failed to select from table, reason:%s\n", taos_errstr(pRes)); +// taos_free_result(pRes); +// ASSERT_TRUE(false); +// } + printResult(pRes); taos_free_result(pRes); taos_close(pConn);