From cd7915ddc3a796ee5beeb96a6545d5b716181312 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Fri, 8 Oct 2021 14:33:50 +0800 Subject: [PATCH] [TS-402]: add test case for update option equals 2 --- tests/pytest/fulltest.sh | 2 +- .../{bug_td2279.py => update_options.py} | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) rename tests/pytest/update/{bug_td2279.py => update_options.py} (76%) diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index 76a5868e61..bb973d2602 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -198,7 +198,7 @@ python3 ./test.py -f update/merge_commit_data2.py python3 ./test.py -f update/merge_commit_data2_update0.py python3 ./test.py -f update/merge_commit_last-0.py python3 ./test.py -f update/merge_commit_last.py -python3 ./test.py -f update/bug_td2279.py +python3 ./test.py -f update/update_options.py #======================p2-end=============== #======================p3-start=============== diff --git a/tests/pytest/update/bug_td2279.py b/tests/pytest/update/update_options.py similarity index 76% rename from tests/pytest/update/bug_td2279.py rename to tests/pytest/update/update_options.py index 7e8640dfa0..dd1b82fc59 100644 --- a/tests/pytest/update/bug_td2279.py +++ b/tests/pytest/update/update_options.py @@ -34,6 +34,7 @@ class TDTestCase: def run(self): tdSql.prepare() + # test case for TD-2279 print("==============step1") tdSql.execute("create table t (ts timestamp, a int)") @@ -58,6 +59,24 @@ class TDTestCase: tdSql.checkRows(6612) tdDnodes.stop(1) + tdDnodes.startWithoutSleep(1) + tdLog.sleep(3) + + # test case for https://jira.taosdata.com:18080/browse/TS-402 + tdSql.execute("create database test update 1") + tdSql.execute("use test") + + tdSql.execute("create table tb (ts timestamp, c1 int, c2 int, c3 int)") + tdSql.execute("insert into tb values(%d, 1, 2, 3)(%d, null, null, 9)" % (self.ts, self.ts)) + + tdSql.query("select * from tb") + tdSql.checkRows(1) + tdSql.checkData(0, 1, None) + tdSql.checkData(0, 2, None) + tdSql.checkData(0, 3, 9) + + + def stop(self): tdSql.close() -- GitLab