[test: modify timeout len]
This commit is contained in:
parent
0c8b9db19c
commit
dc3dfad5d0
|
@ -48,21 +48,21 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
|
||||||
#output = child.readline()
|
#output = child.readline()
|
||||||
#print (output.decode())
|
#print (output.decode())
|
||||||
if len(expectString) != 0:
|
if len(expectString) != 0:
|
||||||
i = child.expect([expectString, taosExpect.TIMEOUT, taosExpect.EOF], timeout=6)
|
i = child.expect([expectString, taosExpect.TIMEOUT, taosExpect.EOF], timeout=20)
|
||||||
else:
|
else:
|
||||||
i = child.expect([taosExpect.TIMEOUT, taosExpect.EOF], timeout=6)
|
i = child.expect([taosExpect.TIMEOUT, taosExpect.EOF], timeout=20)
|
||||||
|
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
retResult = child.before
|
retResult = child.before
|
||||||
else:
|
else:
|
||||||
retResult = child.before.decode()
|
retResult = child.before.decode()
|
||||||
print("cmd return result:\n%s\n"%retResult)
|
print("cmd return result:\n%s\n"%retResult)
|
||||||
#print(child.after.decode())
|
# print(child.after.decode())
|
||||||
if i == 0:
|
if i == 0:
|
||||||
print ('taos login success! Here can run sql, taos> ')
|
print ('taos login success! Here can run sql, taos> ')
|
||||||
if len(sqlString) != 0:
|
if len(sqlString) != 0:
|
||||||
child.sendline (sqlString)
|
child.sendline (sqlString)
|
||||||
w = child.expect(["Query OK", taosExpect.TIMEOUT, taosExpect.EOF], timeout=1)
|
w = child.expect(["Query OK", taosExpect.TIMEOUT, taosExpect.EOF], timeout=10)
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
retResult = child.before
|
retResult = child.before
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue