未验证 提交 007470ff 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

Merge pull request #13830 from taosdata/fix/ZhiqiangWang/TD-16357-add-taosd-assert-kill

test: add taosd assert kill
...@@ -1899,7 +1899,7 @@ _return: ...@@ -1899,7 +1899,7 @@ _return:
void ctgUpdateThreadUnexpectedStopped(void) { void ctgUpdateThreadUnexpectedStopped(void) {
if (CTG_IS_LOCKED(&gCtgMgmt.lock) > 0) CTG_UNLOCK(CTG_READ, &gCtgMgmt.lock); if (!atomic_load_8((int8_t*)&gCtgMgmt.exit) && CTG_IS_LOCKED(&gCtgMgmt.lock) > 0) CTG_UNLOCK(CTG_READ, &gCtgMgmt.lock);
} }
void ctgCleanupCacheQueue(void) { void ctgCleanupCacheQueue(void) {
......
...@@ -134,7 +134,7 @@ class TDTestCase: ...@@ -134,7 +134,7 @@ class TDTestCase:
parameterDict['cfg'] = cfgPath parameterDict['cfg'] = cfgPath
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
prepareEnvThread.start() prepareEnvThread.start()
time.sleep(2) prepareEnvThread.join()
# wait stb ready # wait stb ready
while 1: while 1:
...@@ -245,6 +245,7 @@ class TDTestCase: ...@@ -245,6 +245,7 @@ class TDTestCase:
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
prepareEnvThread.start() prepareEnvThread.start()
prepareEnvThread.join()
# wait db ready # wait db ready
while 1: while 1:
...@@ -371,6 +372,7 @@ class TDTestCase: ...@@ -371,6 +372,7 @@ class TDTestCase:
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
prepareEnvThread.start() prepareEnvThread.start()
prepareEnvThread.join()
# wait db ready # wait db ready
while 1: while 1:
......
...@@ -61,7 +61,8 @@ goto :eof ...@@ -61,7 +61,8 @@ goto :eof
set tt=%1 set tt=%1
set tt=%tt:.= % set tt=%tt:.= %
set tt=%tt::= % set tt=%tt::= %
set index=1 set tt=%tt: 0= %
set /a index=1
for %%a in (%tt%) do ( for %%a in (%tt%) do (
if !index! EQU 1 ( if !index! EQU 1 (
set /a hh=%%a set /a hh=%%a
...@@ -75,5 +76,5 @@ for %%a in (%tt%) do ( ...@@ -75,5 +76,5 @@ for %%a in (%tt%) do (
) )
set /a index=index+1 set /a index=index+1
) )
set /a _timeTemp=(%hh%*60+%mm%)*60+%ss% || echo hh:%hh% mm:%mm% ss:%ss% set /a _timeTemp=(%hh%*60+%mm%)*60+%ss%
goto :eof goto :eof
\ No newline at end of file
...@@ -21,6 +21,7 @@ import base64 ...@@ -21,6 +21,7 @@ import base64
import json import json
import platform import platform
import socket import socket
import threading
from distutils.log import warn as printf from distutils.log import warn as printf
from fabric2 import Connection from fabric2 import Connection
sys.path.append("../pytest") sys.path.append("../pytest")
...@@ -30,6 +31,13 @@ from util.cases import * ...@@ -30,6 +31,13 @@ from util.cases import *
import taos import taos
def checkRunTimeError():
import win32gui
while 1:
time.sleep(1)
hwnd = win32gui.FindWindow(None, "Microsoft Visual C++ Runtime Library")
if hwnd:
os.system("TASKKILL /F /IM taosd.exe")
if __name__ == "__main__": if __name__ == "__main__":
...@@ -42,9 +50,6 @@ if __name__ == "__main__": ...@@ -42,9 +50,6 @@ if __name__ == "__main__":
logSql = True logSql = True
stop = 0 stop = 0
restart = False restart = False
windows = 0
if platform.system().lower() == 'windows':
windows = 1
updateCfgDict = {} updateCfgDict = {}
execCmd = "" execCmd = ""
opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:', [ opts, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:m:l:scghrd:k:e:', [
...@@ -159,7 +164,9 @@ if __name__ == "__main__": ...@@ -159,7 +164,9 @@ if __name__ == "__main__":
host = masterIp host = masterIp
tdLog.info("Procedures for tdengine deployed in %s" % (host)) tdLog.info("Procedures for tdengine deployed in %s" % (host))
if windows: if platform.system().lower() == 'windows':
if (masterIp == "" and not fileName[0:12] == "0-others\\udf"):
threading.Thread(target=checkRunTimeError,daemon=True).start()
tdCases.logSql(logSql) tdCases.logSql(logSql)
tdLog.info("Procedures for testing self-deployment") tdLog.info("Procedures for testing self-deployment")
tdDnodes.init(deployPath, masterIp) tdDnodes.init(deployPath, masterIp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册