提交 0616475e 编写于 作者: L liuyq-617

[TD-2734]<test>fix timeout error

上级 03781654
...@@ -212,7 +212,7 @@ class TDDnode: ...@@ -212,7 +212,7 @@ class TDDnode:
self.cfgDict["logDir"] = self.logDir self.cfgDict["logDir"] = self.logDir
# self.cfg("dataDir",self.dataDir) # self.cfg("dataDir",self.dataDir)
# self.cfg("logDir",self.logDir) # self.cfg("logDir",self.logDir)
print(updatecfgDict) # print(updatecfgDict)
isFirstDir = 1 isFirstDir = 1
if updatecfgDict[0] and updatecfgDict[0][0]: if updatecfgDict[0] and updatecfgDict[0][0]:
print(updatecfgDict[0][0]) print(updatecfgDict[0][0])
...@@ -292,13 +292,15 @@ class TDDnode: ...@@ -292,13 +292,15 @@ class TDDnode:
break break
popen = subprocess.Popen('tail -f ' + logFile, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) popen = subprocess.Popen('tail -f ' + logFile, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
pid = popen.pid pid = popen.pid
print('Popen.pid:' + str(pid)) # print('Popen.pid:' + str(pid))
timeout = time.time() + 60*2
while True: while True:
line = popen.stdout.readline().strip() line = popen.stdout.readline().strip()
if bkey in line: if bkey in line:
print(line)
popen.kill() popen.kill()
break break
if time.time() > timeout:
tdLog.exit('wait too long for taosd start')
tdLog.debug("the dnode:%d has been started." % (self.index)) tdLog.debug("the dnode:%d has been started." % (self.index))
else: else:
tdLog.debug("wait 10 seconds for the dnode:%d to start." % (self.index)) tdLog.debug("wait 10 seconds for the dnode:%d to start." % (self.index))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册