From 55d66102065a4097bd5ec73fb70a789a0383c3c7 Mon Sep 17 00:00:00 2001 From: Leo Xu <381899826@qq.com> Date: Thu, 19 Sep 2024 15:22:24 +0800 Subject: [PATCH] =?UTF-8?q?add=20case=20by=20TS-5392=20and=20improve=20?= =?UTF-8?q?=E2=80=98reset=20log=20file=E2=80=99=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0-others/test_hot_refresh_configurations.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/system-test/0-others/test_hot_refresh_configurations.py b/tests/system-test/0-others/test_hot_refresh_configurations.py index ad21e8ce7c..35137dfeb1 100644 --- a/tests/system-test/0-others/test_hot_refresh_configurations.py +++ b/tests/system-test/0-others/test_hot_refresh_configurations.py @@ -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: