[###################################################################]

This commit is contained in:
Ping Xiao 2021-04-08 19:01:28 +08:00
parent c7c8ab0082
commit 0e72f1cb6d
2 changed files with 18 additions and 6 deletions

View File

@ -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__)

View File

@ -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())