未验证 提交 70066d0c 编写于 作者: H huili 提交者: GitHub

Merge pull request #6377 from taosdata/xiaoping/add_test_case

[TD-4505]<test>: add test case for last_row()
......@@ -148,15 +148,38 @@ class TDTestCase:
self.executeQueries()
self.insertData2()
self.executeQueries2()
print("============== alter last cache")
tdSql.execute("alter database test1 cachelast 1")
self.executeQueries2()
tdSql.execute("alter database test1 cachelast 2")
self.executeQueries2()
tdSql.execute("alter database test1 cachelast 3")
self.executeQueries2()
print("============== alter last cache")
tdSql.execute("alter database test1 cachelast 0")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
tdSql.execute("alter database test1 cachelast 1")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
tdSql.execute("alter database test1 cachelast 2")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
tdSql.execute("alter database test1 cachelast 0")
tdSql.execute("alter database test1 cachelast 3")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
......@@ -174,10 +197,22 @@ class TDTestCase:
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 0")
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 1")
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 2")
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 3")
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 0")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 1")
self.executeQueries2()
......@@ -185,6 +220,21 @@ class TDTestCase:
tdDnodes.start(1)
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 2")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
tdSql.execute("alter database test2 cachelast 3")
self.executeQueries2()
tdDnodes.stop(1)
tdDnodes.start(1)
self.executeQueries2()
tdSql.query("select last_row(*) from st group by tbname")
tdSql.checkRows(10)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册