diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index baa2a233d5..ee85a909e7 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -1606,10 +1606,6 @@ static int32_t taosCfgDynamicOptionsForClient(SConfig *pCfg, char *name) { tsTempSpace.reserved = (int64_t)(((double)pItem->fval) * 1024 * 1024 * 1024); uInfo("%s set to %" PRId64, name, tsTempSpace.reserved); matched = true; - } else if (strcasecmp("minimalDataDirGB", name) == 0) { - tsDataSpace.reserved = (int64_t)(((double)pItem->fval) * 1024 * 1024 * 1024); - uInfo("%s set to %" PRId64, name, tsDataSpace.reserved); - matched = true; } else if (strcasecmp("minimalLogDirGB", name) == 0) { tsLogSpace.reserved = (int64_t)(((double)pItem->fval) * 1024 * 1024 * 1024); uInfo("%s set to %" PRId64, name, tsLogSpace.reserved); @@ -1680,10 +1676,6 @@ static int32_t taosCfgDynamicOptionsForClient(SConfig *pCfg, char *name) { return -1; } matched = true; - } else if (strcasecmp("telemetryServer", name) == 0) { - uInfo("%s set from %s to %s", name, pItem->str, tsTelemServer); - tstrncpy(tsTelemServer, pItem->str, TSDB_FQDN_LEN); - matched = true; } break; } diff --git a/source/dnode/vnode/src/vnd/vnodeAsync.c b/source/dnode/vnode/src/vnd/vnodeAsync.c index 66668b60df..313603b19f 100644 --- a/source/dnode/vnode/src/vnd/vnodeAsync.c +++ b/source/dnode/vnode/src/vnd/vnodeAsync.c @@ -433,10 +433,12 @@ static int32_t vnodeAsyncLaunchWorker(SVAsync *async) { return 0; } +#ifdef BUILD_NO_CALL int32_t vnodeAsync(SVAsync *async, EVAPriority priority, int32_t (*execute)(void *), void (*complete)(void *), void *arg, int64_t *taskId) { return vnodeAsyncC(async, 0, priority, execute, complete, arg, taskId); } +#endif int32_t vnodeAsyncC(SVAsync *async, int64_t channelId, EVAPriority priority, int32_t (*execute)(void *), void (*complete)(void *), void *arg, int64_t *taskId) { diff --git a/source/libs/scheduler/src/schUtil.c b/source/libs/scheduler/src/schUtil.c index 39c54ea731..47e6d53b46 100644 --- a/source/libs/scheduler/src/schUtil.c +++ b/source/libs/scheduler/src/schUtil.c @@ -263,6 +263,7 @@ void schCloseJobRef(void) { uint64_t schGenTaskId(void) { return atomic_add_fetch_64(&schMgmt.taskId, 1); } +#ifdef BUILD_NO_CALL uint64_t schGenUUID(void) { static uint64_t hashId = 0; static int32_t requestSerialId = 0; @@ -284,6 +285,7 @@ uint64_t schGenUUID(void) { uint64_t id = ((hashId & 0x0FFF) << 52) | ((pid & 0x0FFF) << 40) | ((ts & 0xFFFFFF) << 16) | (val & 0xFFFF); return id; } +#endif void schFreeRpcCtxVal(const void *arg) { if (NULL == arg) { diff --git a/source/libs/scheduler/test/CMakeLists.txt b/source/libs/scheduler/test/CMakeLists.txt index 703bd5932b..9605cc7a1c 100644 --- a/source/libs/scheduler/test/CMakeLists.txt +++ b/source/libs/scheduler/test/CMakeLists.txt @@ -25,4 +25,9 @@ IF(NOT TD_DARWIN) PUBLIC "${TD_SOURCE_DIR}/include/libs/scheduler/" PRIVATE "${TD_SOURCE_DIR}/source/libs/scheduler/inc" ) + add_test( + NAME schedulerTest + COMMAND schedulerTest + ) + ENDIF() \ No newline at end of file diff --git a/source/libs/scheduler/test/schedulerTests.cpp b/source/libs/scheduler/test/schedulerTests.cpp index fbb1f657b0..b73de83a82 100644 --- a/source/libs/scheduler/test/schedulerTests.cpp +++ b/source/libs/scheduler/test/schedulerTests.cpp @@ -1072,6 +1072,16 @@ TEST(multiThread, forceFree) { //taosSsleep(3); } +TEST(otherTest, otherCase) { + // excpet test + schReleaseJob(0); + schFreeRpcCtx(NULL); + + ASSERT_EQ(schDumpEpSet(NULL), (char*)NULL); + ASSERT_EQ(strcmp(schGetOpStr(SCH_OP_NULL), "NULL"), 0); + ASSERT_EQ(strcmp(schGetOpStr((SCH_OP_TYPE)100), "UNKNOWN"), 0); +} + int main(int argc, char **argv) { taosSeedRand(taosGetTimestampSec()); testing::InitGoogleTest(&argc, argv); diff --git a/source/libs/stream/test/CMakeLists.txt b/source/libs/stream/test/CMakeLists.txt index c11d8fe3e6..c90e05bcf6 100644 --- a/source/libs/stream/test/CMakeLists.txt +++ b/source/libs/stream/test/CMakeLists.txt @@ -34,7 +34,7 @@ add_test( COMMAND streamUpdateTest ) -# add_test( -# NAME checkpointTest -# COMMAND checkpointTest -# ) \ No newline at end of file +add_test( + NAME checkpointTest + COMMAND checkpointTest +) \ No newline at end of file diff --git a/tests/army/community/cluster/incSnapshot.py b/tests/army/community/cluster/incSnapshot.py index d309bae72c..6bcf547136 100644 --- a/tests/army/community/cluster/incSnapshot.py +++ b/tests/army/community/cluster/incSnapshot.py @@ -18,6 +18,9 @@ from frame.autogen import * class TDTestCase(TBase): + updatecfgDict = { + 'slowLogScope':"query" + } def init(self, conn, logSql, replicaVar=3): super(TDTestCase, self).init(conn, logSql, replicaVar=3, db="snapshot", checkColName="c1") diff --git a/tests/army/community/cluster/snapshot.py b/tests/army/community/cluster/snapshot.py index b4c4d3c4c8..b21cbb1ad8 100644 --- a/tests/army/community/cluster/snapshot.py +++ b/tests/army/community/cluster/snapshot.py @@ -33,7 +33,8 @@ class TDTestCase(TBase): "lossyColumns" : "float,double", "fPrecision" : "0.000000001", "dPrecision" : "0.00000000000000001", - "ifAdtFse" : "1" + "ifAdtFse" : "1", + 'slowLogScope' : "insert" } def insertData(self): @@ -56,7 +57,7 @@ class TDTestCase(TBase): sql = f"select * from {self.db}.{self.stb} where fc!=100" tdSql.query(sql) tdSql.checkRows(0) - sql = f"select count(*) from {self.db}.{self.stb} where dc!=200" + sql = f"select * from {self.db}.{self.stb} where dc!=200" tdSql.query(sql) tdSql.checkRows(0) sql = f"select avg(fc) from {self.db}.{self.stb}" diff --git a/tests/army/community/cluster/splitVgroupByLearner.py b/tests/army/community/cluster/splitVgroupByLearner.py index 5f75db2db5..c2025a331d 100644 --- a/tests/army/community/cluster/splitVgroupByLearner.py +++ b/tests/army/community/cluster/splitVgroupByLearner.py @@ -31,6 +31,9 @@ from frame.srvCtl import * class TDTestCase(TBase): + updatecfgDict = { + 'slowLogScope' : "others" + } def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to init {__file__}") diff --git a/tests/army/community/cmdline/fullopt.py b/tests/army/community/cmdline/fullopt.py index c0ce709801..c03ba428a1 100644 --- a/tests/army/community/cmdline/fullopt.py +++ b/tests/army/community/cmdline/fullopt.py @@ -31,10 +31,10 @@ class TDTestCase(TBase): 'queryMaxConcurrentTables': '2K', 'streamMax': '1M', 'totalMemoryKB': '1G', - #'rpcQueueMemoryAllowed': '1T', - #'mndLogRetention': '1P', - 'streamBufferSize':'2G' - } + 'streamMax': '1P', + 'streamBufferSize':'1T', + 'slowLogScope':"query" + } def insertData(self): tdLog.info(f"insert data.") @@ -47,8 +47,40 @@ class TDTestCase(TBase): # taosBenchmark run etool.benchMark(command = f"-d {self.db} -t {self.childtable_count} -n {self.insert_rows} -v 2 -y") + def checkQueryOK(self, rets): + if rets[-2][:9] != "Query OK,": + tdLog.exit(f"check taos -s return unecpect: {rets}") + def doTaos(self): tdLog.info(f"check taos command options...") + + # local command + options = [ + "DebugFlag 143", + "enableCoreFile 1", + "fqdn 127.0.0.1", + "firstEp 127.0.0.1", + "locale ENG", + "metaCacheMaxSize 10000", + "minimalTmpDirGB 5", + "minimalLogDirGB 1", + "secondEp 127.0.0.2", + "smlChildTableName smltbname", + "smlAutoChildTableNameDelimiter autochild", + "smlTagName tagname", + "smlTsDefaultName tsdef", + "serverPort 6030", + "slowLogScope insert", + "timezone tz", + "tempDir /var/tmp" + ] + # exec + for option in options: + rets = etool.runBinFile("taos", f"-s \"alter local '{option}'\";") + self.checkQueryOK(rets) + # error + etool.runBinFile("taos", f"-s \"alter local 'nocmd check'\";") + # help rets = etool.runBinFile("taos", "--help") self.checkListNotEmpty(rets) diff --git a/tests/army/community/query/fill/fill_desc.py b/tests/army/community/query/fill/fill_desc.py index bec29c49fd..02e316a4fb 100644 --- a/tests/army/community/query/fill/fill_desc.py +++ b/tests/army/community/query/fill/fill_desc.py @@ -8,6 +8,9 @@ from frame.caseBase import * from frame import * class TDTestCase(TBase): + updatecfgDict = { + 'slowLogScope':"all" + } def init(self, conn, logSql, replicaVar=1): self.replicaVar = int(replicaVar) diff --git a/tests/army/community/query/query_basic.py b/tests/army/community/query/query_basic.py index bfe88e483e..d2e0201860 100644 --- a/tests/army/community/query/query_basic.py +++ b/tests/army/community/query/query_basic.py @@ -29,9 +29,11 @@ from frame import * class TDTestCase(TBase): updatecfgDict = { - "keepColumnName" : "1", + "keepColumnName" : "1", "ttlChangeOnWrite" : "1", - "querySmaOptimize": "1" + "querySmaOptimize" : "1", + "slowLogScope" : "none", + "queryBufferSize" : 10240 } diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index f164d3aedf..92cd28a929 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -400,6 +400,9 @@ class TDTestCase: self.explain_check() + # coverage explain.c add + tdSql.query(f"explain verbose true select * from {dbname}.stb1 partition by c1 order by c2") + def __test_error(self, dbname=DBNAME): ratio = random.uniform(0.001,1)