From 8d477bd68bb1bf5e029a8c3c865884db6e8c44b4 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Fri, 27 May 2022 20:08:23 +0800 Subject: [PATCH] fix(os): windows timezone error --- tests/system-test/0-others/taosShell.py | 8 ++++++-- tests/system-test/0-others/taosShellError.py | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index 1fec9a0c41..079440935b 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -290,8 +290,12 @@ class TDTestCase: sqlFile = pwd + "/0-others/sql.txt" sql1 = "echo create database " + newDbName + " > " + sqlFile sql2 = "echo use " + newDbName + " >> " + sqlFile - sql3 = "echo create table ntbf (ts timestamp, c binary(40)) >> " + sqlFile - sql4 = "echo insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\") >> " + sqlFile + if platform.system().lower() == 'windows': + sql3 = "echo create table ntbf (ts timestamp, c binary(40)) >> " + sqlFile + sql4 = "echo insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\") >> " + sqlFile + else: + sql3 = "echo create table ntbf \(ts timestamp, c binary\(40\)\) >> " + sqlFile + sql4 = "echo insert into ntbf values \(\"2021-04-01 08:00:00.000\", \"test taos -f1\"\)\(\"2021-04-01 08:00:01.000\", \"test taos -f2\"\) >> " + sqlFile sql5 = "echo show databases >> " + sqlFile os.system(sql1) os.system(sql2) diff --git a/tests/system-test/0-others/taosShellError.py b/tests/system-test/0-others/taosShellError.py index 14da924c94..9f1e7d8693 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -218,8 +218,12 @@ class TDTestCase: sqlFile = pwd + "/0-others/sql.txt" sql1 = "echo create database " + newDbName + " > " + sqlFile sql2 = "echo use " + newDbName + " >> " + sqlFile - sql3 = "echo create table ntbf (ts timestamp, c binary(40)) no this item >> " + sqlFile - sql4 = "echo insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\") >> " + sqlFile + if platform.system().lower() == 'windows': + sql3 = "echo create table ntbf (ts timestamp, c binary(40)) no this item >> " + sqlFile + sql4 = "echo insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\") >> " + sqlFile + else: + sql3 = "echo create table ntbf \(ts timestamp, c binary\(40\)\) no this item >> " + sqlFile + sql4 = "echo insert into ntbf values \(\"2021-04-01 08:00:00.000\", \"test taos -f1\"\)\(\"2021-04-01 08:00:01.000\", \"test taos -f2\"\) >> " + sqlFile sql5 = "echo show databases >> " + sqlFile os.system(sql1) os.system(sql2)