diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 22eacdc291..449e44eb13 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -918,14 +918,23 @@ TEST(clientCase, projection_query_stables) { TAOS_FIELD* pFields = taos_fetch_fields(pRes); int32_t numOfFields = taos_num_fields(pRes); + int32_t numOfRows = 0; int32_t i = 0; char str[512] = {0}; - while ((pRow = taos_fetch_row(pRes)) != NULL) { - // int32_t code = taos_print_row(str, pRow, pFields, numOfFields); - if (i++ % 100000 == 0) { - printf("%d\n", i); + while (1) { + int32_t c = taos_fetch_block_s(pRes, &numOfRows, &pRow); + if (numOfRows <= 0) { + break; } + i += numOfRows; + printf("%d\n", i); } +// while ((pRow = taos_fetch_row(pRes)) != NULL) { +// int32_t code = taos_print_row(str, pRow, pFields, numOfFields); +// if (i++ % 100000 == 0) { +// printf("%d\n", i); +// } +// } taos_free_result(pRes); taos_close(pConn); diff --git a/source/util/test/CMakeLists.txt b/source/util/test/CMakeLists.txt index e8e3348343..07981483bb 100644 --- a/source/util/test/CMakeLists.txt +++ b/source/util/test/CMakeLists.txt @@ -13,7 +13,7 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR)) LIST(REMOVE_ITEM SOURCE_LIST ${CMAKE_CURRENT_SOURCE_DIR}/trefTest.c) ADD_EXECUTABLE(utilTest ${SOURCE_LIST}) - TARGET_LINK_LIBRARIES(utilTest util common os gtest pthread) + TARGET_LINK_LIBRARIES(utilTest util common os gtest pthread public taos) LIST(REMOVE_ITEM SOURCE_LIST ${CMAKE_CURRENT_SOURCE_DIR}/cacheTest.cpp) LIST(APPEND SOURCE_LIST ${CMAKE_CURRENT_SOURCE_DIR}/hashTest.cpp)