未验证 提交 1c6c24e1 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

test: remove database check logic (#11507)

* [TD-13052]<feature>: taosTools prepare for 3.0

* update taos-tools

* update taos-tools

* test: remove database check logic

[TD-13558]
上级 800b878f
......@@ -54,10 +54,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 9223372036854770000)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -174,14 +174,6 @@ class TDTestCase:
# TSIM: sql drop database $db
tdLog.info('drop database db')
tdSql.execute('drop database db')
# TSIM: sql show databases
tdLog.info('show databases')
tdSql.query('show databases')
# TSIM: if $rows != 0 then
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# TSIM: return -1
# TSIM: endi
# convert end
def stop(self):
......
......@@ -91,10 +91,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -38,28 +38,38 @@ class TDTestCase:
tdSql.checkRows(1)
# Case 2
tdSql.execute("insert into t1(c1, ts) values(2, %d)(3, %d)" % (self.ts + 1000, self.ts + 2000))
tdSql.execute(
"insert into t1(c1, ts) values(2, %d)(3, %d)" %
(self.ts + 1000, self.ts + 2000))
tdSql.query("select * from t1")
tdSql.checkRows(3)
# Case 3
tdSql.execute("create table t2(ts timestamp, c1 timestamp)")
tdSql.execute(" insert into t2(c1, ts) values(%d, %d)" % (self.ts, self.ts + 5000))
tdSql.execute(
" insert into t2(c1, ts) values(%d, %d)" %
(self.ts, self.ts + 5000))
tdSql.query("select * from t2")
tdSql.checkRows(1)
tdSql.execute(" insert into t2(c1, ts) values(%d, %d)(%d, %d)" % (self.ts, self.ts + 6000, self.ts + 3000, self.ts + 8000))
tdSql.execute(
" insert into t2(c1, ts) values(%d, %d)(%d, %d)" %
(self.ts, self.ts + 6000, self.ts + 3000, self.ts + 8000))
tdSql.query("select * from t2")
tdSql.checkRows(3)
# Case 4
tdSql.execute("create table stb(ts timestamp, c1 int, c2 binary(20)) tags(tstag timestamp, t1 int)")
tdSql.execute("insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', %d, 1)" % self.ts)
tdSql.execute(
"create table stb(ts timestamp, c1 int, c2 binary(20)) tags(tstag timestamp, t1 int)")
tdSql.execute(
"insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', %d, 1)" %
self.ts)
tdSql.query("select * from stb")
tdSql.checkRows(1)
# Case 5
tdSql.execute("insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', now, 1) tb2(c1, ts) using stb tags(now + 2m, 1000) values(1, now - 1h)")
tdSql.execute(
"insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', now, 1) tb2(c1, ts) using stb tags(now + 2m, 1000) values(1, now - 1h)")
tdSql.query("select * from stb")
tdSql.checkRows(3)
......@@ -68,14 +78,16 @@ class TDTestCase:
tdSql.checkRows(6)
# Case 6
tdSql.execute("create table stb2 (ts timestamp, c1 timestamp, c2 timestamp) tags(t1 timestamp, t2 timestamp)")
tdSql.execute(
"create table stb2 (ts timestamp, c1 timestamp, c2 timestamp) tags(t1 timestamp, t2 timestamp)")
tdSql.execute(" insert into tb4(c1, c2, ts) using stb2(t2, t1) tags(now, now + 1h) values(now + 1s, now + 2s, now + 3s)(now -1s, now - 2s, now - 3s) tb5(c2, ts, c1) using stb2(t2) tags(now + 1h) values(now, now, now)")
tdSql.query("select * from stb2")
tdSql.checkRows(3)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
......@@ -91,10 +91,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -46,7 +46,8 @@ class TDTestCase:
tdLog.info('tdSql.checkData(0, 1, 18446744073709551614)')
tdSql.checkData(0, 1, 18446744073709551614)
tdLog.info('=============== step4')
tdLog.info("insert into tb values (now+3m, 18446744073709551615) -x step4")
tdLog.info(
"insert into tb values (now+3m, 18446744073709551615) -x step4")
tdSql.error("insert into tb values (now+3m, 18446744073709551615)")
tdLog.info("insert into tb values (now+3m, NULL)")
tdSql.execute("insert into tb values (now+3m, NULL)")
......@@ -93,10 +94,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -93,10 +93,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -16,7 +16,8 @@ class TDTestCase:
tdLog.info('=============== step1')
tdLog.info('create table tb (ts timestamp, speed smallint unsigned)')
tdSql.execute('create table tb (ts timestamp, speed smallint unsigned)')
tdSql.execute(
'create table tb (ts timestamp, speed smallint unsigned)')
tdLog.info("insert into tb values (now, NULL)")
tdSql.execute("insert into tb values (now, NULL)")
tdLog.info('select * from tb order by ts desc')
......@@ -93,10 +94,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
# convert end
def stop(self):
......
......@@ -91,11 +91,6 @@ class TDTestCase:
tdSql.checkData(0, 1, 2)
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
tdSql.query('show databases')
tdLog.info('tdSql.checkRow(0)')
tdSql.checkRows(0)
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册