coverage: add tglobal.c
This commit is contained in:
parent
b3a6fa9c12
commit
6dec22c1c2
|
@ -540,14 +540,12 @@ int32_t mndSetConsumerCommitLogs(SMnode *pMnode, STrans *pTrans, SMqConsumerObj
|
||||||
|
|
||||||
static void *topicNameDup(void *p) { return taosStrdup((char *)p); }
|
static void *topicNameDup(void *p) { return taosStrdup((char *)p); }
|
||||||
|
|
||||||
#ifdef BUILD_NO_CALL
|
|
||||||
static void freeItem(void *param) {
|
static void freeItem(void *param) {
|
||||||
void *pItem = *(void **)param;
|
void *pItem = *(void **)param;
|
||||||
if (pItem != NULL) {
|
if (pItem != NULL) {
|
||||||
taosMemoryFree(pItem);
|
taosMemoryFree(pItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
|
int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
|
||||||
SMnode *pMnode = pMsg->info.node;
|
SMnode *pMnode = pMsg->info.node;
|
||||||
|
|
|
@ -18,6 +18,9 @@ from frame.autogen import *
|
||||||
|
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
|
updatecfgDict = {
|
||||||
|
'slowLogScope':"query"
|
||||||
|
}
|
||||||
|
|
||||||
def init(self, conn, logSql, replicaVar=3):
|
def init(self, conn, logSql, replicaVar=3):
|
||||||
super(TDTestCase, self).init(conn, logSql, replicaVar=3, db="snapshot", checkColName="c1")
|
super(TDTestCase, self).init(conn, logSql, replicaVar=3, db="snapshot", checkColName="c1")
|
||||||
|
|
|
@ -33,8 +33,13 @@ class TDTestCase(TBase):
|
||||||
"lossyColumns" : "float,double",
|
"lossyColumns" : "float,double",
|
||||||
"fPrecision" : "0.000000001",
|
"fPrecision" : "0.000000001",
|
||||||
"dPrecision" : "0.00000000000000001",
|
"dPrecision" : "0.00000000000000001",
|
||||||
"ifAdtFse" : "1"
|
"ifAdtFse" : "1",
|
||||||
|
'slowLogScope' : "insert"
|
||||||
}
|
}
|
||||||
|
updatecfgDict = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def insertData(self):
|
def insertData(self):
|
||||||
tdLog.info(f"insert data.")
|
tdLog.info(f"insert data.")
|
||||||
|
|
|
@ -31,6 +31,9 @@ from frame.srvCtl import *
|
||||||
|
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
|
updatecfgDict = {
|
||||||
|
'slowLogScope' : "others"
|
||||||
|
}
|
||||||
|
|
||||||
def init(self, conn, logSql, replicaVar=1):
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
tdLog.debug(f"start to init {__file__}")
|
tdLog.debug(f"start to init {__file__}")
|
||||||
|
|
|
@ -33,7 +33,8 @@ class TDTestCase(TBase):
|
||||||
'totalMemoryKB': '1G',
|
'totalMemoryKB': '1G',
|
||||||
#'rpcQueueMemoryAllowed': '1T',
|
#'rpcQueueMemoryAllowed': '1T',
|
||||||
#'mndLogRetention': '1P',
|
#'mndLogRetention': '1P',
|
||||||
'streamBufferSize':'2G'
|
'streamBufferSize':'2G',
|
||||||
|
'slowLogScope':"invalid"
|
||||||
}
|
}
|
||||||
|
|
||||||
def insertData(self):
|
def insertData(self):
|
||||||
|
@ -47,8 +48,42 @@ class TDTestCase(TBase):
|
||||||
# taosBenchmark run
|
# taosBenchmark run
|
||||||
etool.benchMark(command = f"-d {self.db} -t {self.childtable_count} -n {self.insert_rows} -v 2 -y")
|
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):
|
def doTaos(self):
|
||||||
tdLog.info(f"check taos command options...")
|
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
|
# help
|
||||||
rets = etool.runBinFile("taos", "--help")
|
rets = etool.runBinFile("taos", "--help")
|
||||||
self.checkListNotEmpty(rets)
|
self.checkListNotEmpty(rets)
|
||||||
|
|
|
@ -8,6 +8,9 @@ from frame.caseBase import *
|
||||||
from frame import *
|
from frame import *
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
|
updatecfgDict = {
|
||||||
|
'slowLogScope':"all"
|
||||||
|
}
|
||||||
|
|
||||||
def init(self, conn, logSql, replicaVar=1):
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
self.replicaVar = int(replicaVar)
|
self.replicaVar = int(replicaVar)
|
||||||
|
|
|
@ -29,9 +29,11 @@ from frame import *
|
||||||
|
|
||||||
class TDTestCase(TBase):
|
class TDTestCase(TBase):
|
||||||
updatecfgDict = {
|
updatecfgDict = {
|
||||||
"keepColumnName" : "1",
|
"keepColumnName" : "1",
|
||||||
"ttlChangeOnWrite" : "1",
|
"ttlChangeOnWrite" : "1",
|
||||||
"querySmaOptimize": "1"
|
"querySmaOptimize" : "1",
|
||||||
|
"slowLogScope" : "none",
|
||||||
|
"queryBufferSize" : 10240
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue