coverage: add tglobal.c

This commit is contained in:
Alex Duan 2024-02-18 20:51:49 +08:00
parent b3a6fa9c12
commit 6dec22c1c2
7 changed files with 55 additions and 6 deletions

View File

@ -540,14 +540,12 @@ int32_t mndSetConsumerCommitLogs(SMnode *pMnode, STrans *pTrans, SMqConsumerObj
static void *topicNameDup(void *p) { return taosStrdup((char *)p); }
#ifdef BUILD_NO_CALL
static void freeItem(void *param) {
void *pItem = *(void **)param;
if (pItem != NULL) {
taosMemoryFree(pItem);
}
}
#endif
int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
SMnode *pMnode = pMsg->info.node;

View File

@ -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")

View File

@ -33,8 +33,13 @@ class TDTestCase(TBase):
"lossyColumns" : "float,double",
"fPrecision" : "0.000000001",
"dPrecision" : "0.00000000000000001",
"ifAdtFse" : "1"
"ifAdtFse" : "1",
'slowLogScope' : "insert"
}
updatecfgDict = {
}
def insertData(self):
tdLog.info(f"insert data.")

View File

@ -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__}")

View File

@ -33,7 +33,8 @@ class TDTestCase(TBase):
'totalMemoryKB': '1G',
#'rpcQueueMemoryAllowed': '1T',
#'mndLogRetention': '1P',
'streamBufferSize':'2G'
'streamBufferSize':'2G',
'slowLogScope':"invalid"
}
def insertData(self):
@ -47,8 +48,42 @@ 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[-1][: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",
"minimalDataDirGB 4",
"minimalLogDirGB 1",
"secondEp 127.0.0.2",
"smlChildTableName smltbname",
"smlAutoChildTableNameDelimiter autochild",
"smlTagName tagname",
"smlTsDefaultName tsdef",
"serverPort 6030",
"slowLogScope insert",
"timezone tz",
"tempDir /var/tmp",
"telemetryServer telserver"
]
# 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)

View File

@ -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)

View File

@ -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
}