提交 0c9964d3 编写于 作者: H Haojun Liao

test(query): update the unit test.

上级 eb988399
......@@ -53,6 +53,6 @@ target_link_libraries(
PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom
)
if(${BUILD_TEST})
#if(${BUILD_TEST})
ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})
\ No newline at end of file
#endif(${BUILD_TEST})
\ No newline at end of file
......@@ -1036,7 +1036,7 @@ void launchAsyncQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaData* pResultM
pRequest->metric.planEnd = taosGetTimestampUs();
if (code == TSDB_CODE_SUCCESS) {
tscDebug("0x%" PRIx64 " create query plan success, elapsed time:%.2f ms, %0x" PRIx64, pRequest->self,
tscDebug("0x%" PRIx64 " create query plan success, elapsed time:%.2f ms, 0x%" PRIx64, pRequest->self,
(pRequest->metric.planEnd - st)/1000.0, pRequest->requestId);
}
......
......@@ -676,13 +676,14 @@ TEST(testCase, projection_query_tables) {
// }
// taos_free_result(pRes);
TAOS_RES* pRes = taos_query(pConn, "use abc1");
TAOS_RES* pRes = taos_query(pConn, "use benchmarkcpu");
taos_free_result(pRes);
pRes = taos_query(pConn, "create stable st1 (ts timestamp, k int) tags(a int)");
if (taos_errno(pRes) != 0) {
printf("failed to create table tu, reason:%s\n", taos_errstr(pRes));
}
taos_free_result(pRes);
pRes = taos_query(pConn, "create stable st2 (ts timestamp, k int) tags(a int)");
......@@ -697,11 +698,17 @@ TEST(testCase, projection_query_tables) {
}
taos_free_result(pRes);
for(int32_t i = 0; i < 2; ++i) {
printf("create table :%d\n", i);
createNewTable(pConn, i);
for (int32_t i = 0; i < 500; ++i) {
pRes = taos_query(pConn,
"SELECT max(usage_user), max(usage_system), max(usage_idle), max(usage_nice), max(usage_iowait), "
"max(usage_irq), max(usage_softirq), max(usage_steal), max(usage_guest), "
"max(usage_guest_nice) FROM cpu WHERE hostname IN ('host_249') AND ts >= 1451648911646 AND ts < "
"1451677711646;");
taos_free_result(pRes);
// printf("create table :%d\n", i);
// createNewTable(pConn, i);
}
//
//
// pRes = taos_query(pConn, "select * from tu");
// if (taos_errno(pRes) != 0) {
// printf("failed to select from table, reason:%s\n", taos_errstr(pRes));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册