diff --git a/tests/pytest/insert/basic.py b/tests/pytest/insert/basic.py index dcb5834d559968a964c4057c61d9b6a40cf8ab15..f23f38651aa57590a14824077e003812ea10d8bd 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 d4f8c4127d4622c0a8eab4585d0555d3e8bb8f1e..1ee3c3a4274d67a76fdae442b2d26a4de29392a2 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