test: fix win test stop taosd error
This commit is contained in:
parent
b4bb80ba9d
commit
8b42d73742
|
@ -518,7 +518,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}^' ^&^& echo aa') do @(ps | grep %%a | awk '{print $1}' )" % (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(
|
||||
|
|
|
@ -40,7 +40,7 @@ class ClusterComCheck:
|
|||
def checkDnodes(self,dnodeNumbers):
|
||||
count=0
|
||||
# print(tdSql)
|
||||
while count < 5:
|
||||
while count < 30:
|
||||
tdSql.query("show dnodes")
|
||||
# tdLog.debug(tdSql.queryResult)
|
||||
status=0
|
||||
|
@ -50,13 +50,13 @@ class ClusterComCheck:
|
|||
tdLog.info(status)
|
||||
|
||||
if status == dnodeNumbers:
|
||||
tdLog.success("it find cluster with %d dnodes and check that all cluster dnodes are ready within 5s! " %dnodeNumbers)
|
||||
tdLog.success("it find cluster with %d dnodes and check that all cluster dnodes are ready within 30s! " %dnodeNumbers)
|
||||
return True
|
||||
count+=1
|
||||
time.sleep(1)
|
||||
else:
|
||||
tdLog.debug(tdSql.queryResult)
|
||||
tdLog.exit("it find cluster with %d dnodes but check that there dnodes are not ready within 5s ! "%dnodeNumbers)
|
||||
tdLog.exit("it find cluster with %d dnodes but check that there dnodes are not ready within 30s ! "%dnodeNumbers)
|
||||
|
||||
def checkDbRows(self,dbNumbers):
|
||||
dbNumbers=int(dbNumbers)
|
||||
|
|
Loading…
Reference in New Issue