Merge pull request #27964 from taosdata/test/3.0/TS-5392
add case by TS-5392 and improve ‘reset log file’ check
This commit is contained in:
commit
adc12a89e5
|
@ -157,6 +157,12 @@ class TDTestCase:
|
|||
"alias": "tsLogKeepDays",
|
||||
"values": [-365000, 10, 365000],
|
||||
"except_values": [-365001, 365001]
|
||||
},
|
||||
{
|
||||
"name": "syncLogBufferMemoryAllowed",
|
||||
"alias": "syncLogBufferMemoryAllowed",
|
||||
"values": [104857600, 1048576000, 9223372036854775807],
|
||||
"except_values": [-104857600, 104857599, 9223372036854775808]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -235,11 +241,15 @@ class TDTestCase:
|
|||
def run(self):
|
||||
|
||||
# reset log
|
||||
taosdLogAbsoluteFilename = tdCom.getTaosdPath() + "/log/" + "taosdlog*"
|
||||
taosdLogPath = tdCom.getTaosdPath() + "/log/*"
|
||||
tdSql.execute("alter all dnodes 'resetlog';")
|
||||
r = subprocess.Popen("cat {} | grep 'reset log file'".format(taosdLogAbsoluteFilename), shell=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
time.sleep(1)
|
||||
cmd = "egrep 'reset log file' {}".format(taosdLogPath)
|
||||
tdLog.debug("run cmd: {}".format(cmd))
|
||||
r = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
stdout, stderr = r.communicate()
|
||||
tdLog.debug("stdout: {}".format(stdout.decode()))
|
||||
tdLog.debug("stderr: {}".format(stderr.decode()))
|
||||
assert ('reset log file' in stdout.decode())
|
||||
|
||||
for key in self.configration_dic:
|
||||
|
|
Loading…
Reference in New Issue