test: fix win test stop taosd error
This commit is contained in:
parent
22f03694bc
commit
3b8669a50d
|
@ -300,7 +300,7 @@ class TDDnode:
|
|||
|
||||
if self.valgrind == 0:
|
||||
if platform.system().lower() == 'windows':
|
||||
cmd = "mintty -h never -w hide %s -c %s" % (
|
||||
cmd = "mintty -h never %s -c %s" % (
|
||||
binPath, self.cfgDir)
|
||||
else:
|
||||
cmd = "nohup %s -c %s > /dev/null 2>&1 & " % (
|
||||
|
@ -309,7 +309,7 @@ class TDDnode:
|
|||
valgrindCmdline = "valgrind --log-file=\"%s/../log/valgrind.log\" --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes"%self.cfgDir
|
||||
|
||||
if platform.system().lower() == 'windows':
|
||||
cmd = "mintty -h never -w hide %s %s -c %s" % (
|
||||
cmd = "mintty -h never %s %s -c %s" % (
|
||||
valgrindCmdline, binPath, self.cfgDir)
|
||||
else:
|
||||
cmd = "nohup %s %s -c %s 2>&1 & " % (
|
||||
|
@ -521,7 +521,7 @@ class TDDnode:
|
|||
|
||||
if self.running != 0:
|
||||
if platform.system().lower() == 'windows':
|
||||
psCmd = "for /f %a in ('wmic process where \"name='taosd.exe' and CommandLine like '%%dnode%d%%'\" get processId ^| xargs echo ^| awk ^'{print $2}^'') do @(ps | grep %a | awk '{print $1}' | xargs kill -INT )" % (self.index)
|
||||
psCmd = "for /f %%a in ('wmic process where \"name='taosd.exe' and CommandLine like '%%dnode%d%%'\" get processId ^| xargs echo ^| awk ^'{print $2}^'') do @(ps | grep %%a | awk '{print $1}' | xargs kill -INT )" % (self.index)
|
||||
else:
|
||||
psCmd = "ps -ef|grep -w %s| grep dnode%d|grep -v grep | awk '{print $2}'" % (toBeKilled,self.index)
|
||||
processID = subprocess.check_output(
|
||||
|
|
|
@ -48,6 +48,8 @@ class TDTestCase:
|
|||
#!for bug
|
||||
tdDnodes.stoptaosd(1)
|
||||
sleep(self.delaytime)
|
||||
if platform.system().lower() == 'windows':
|
||||
sleep(10)
|
||||
tdSql.error('select server_status()')
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in New Issue