From 0e72f1cb6d64ab34a8d712a5928b3eee65af1e71 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Thu, 8 Apr 2021 19:01:28 +0800 Subject: [PATCH] [###################################################################] --- tests/pytest/insert/basic.py | 3 +++ tests/pytest/topic/topicQuery.py | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/pytest/insert/basic.py b/tests/pytest/insert/basic.py index dcb5834d55..f23f38651a 100644 --- a/tests/pytest/insert/basic.py +++ b/tests/pytest/insert/basic.py @@ -43,6 +43,9 @@ class TDTestCase: tdSql.query("select * from tb") tdSql.checkRows(insertRows + 4) + # test case for https://jira.taosdata.com:18080/browse/TD-3716: + tdSql.error("insert into tb(now, 1)") + def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) diff --git a/tests/pytest/topic/topicQuery.py b/tests/pytest/topic/topicQuery.py index d4f8c4127d..1ee3c3a427 100644 --- a/tests/pytest/topic/topicQuery.py +++ b/tests/pytest/topic/topicQuery.py @@ -54,11 +54,11 @@ class TDTestCase: tdSql.execute("use db") - tdSql.execute("create table test(ts timestamp, value int)") - tdSql.execute("insert into test values(%d, 1)" % self.ts) - tdSql.execute("insert into test values(%d, 1)" % (self.ts + 1)) - tdSql.execute("insert into test values(%d, 1)" % (self.ts + 2)) - tdSql.execute("insert into test values(%d, 1)" % (self.ts + 3)) + tdSql.execute("create table test(ts timestamp, start timestamp, value int)") + tdSql.execute("insert into test values(%d, %d, 1)" % (self.ts, self.ts)) + tdSql.execute("insert into test values(%d, %d, 1)" % (self.ts + 1, self.ts + 1)) + tdSql.execute("insert into test values(%d, %d, 1)" % (self.ts + 2, self.ts + 2)) + tdSql.execute("insert into test values(%d, %d, 1)" % (self.ts + 3, self.ts + 3)) tdSql.query("select * from test") tdSql.checkRows(4) @@ -72,6 +72,15 @@ class TDTestCase: tdSql.query("select * from test where ts = %d" % self.ts) tdSql.checkRows(1) + tdSql.query("select * from test where start >= %d" % self.ts) + tdSql.checkRows(4) + + tdSql.query("select * from test where start > %d" % self.ts) + tdSql.checkRows(3) + + tdSql.query("select * from test where start = %d" % self.ts) + tdSql.checkRows(1) + def stop(self): tdSql.close() @@ -79,4 +88,4 @@ class TDTestCase: tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file -- GitLab