未验证 提交 142ca8ee 编写于 作者: H huili 提交者: GitHub

Merge pull request #5048 from taosdata/xiaoping/add_test_case2

fix same errors
......@@ -25,19 +25,19 @@ class TDTestCase:
tdSql.init(conn.cursor(), logSql)
def run(self):
self.ntables = 10
self.rowsPerTable = 10
self.ntables = 1000
self.ts = 1520000010000
tdDnodes.stop(1)
# Test1 1 dataDir
cfg={
'10' : 'maxVgroupsPerDb',
'100' : 'maxTablesPerVnode',
'/mnt/data00 0 1' : 'dataDir',
'/mnt/data01 0 0' : 'dataDir',
'/mnt/data02 0 0' : 'dataDir',
'/mnt/data03 1 0' : 'dataDir',
'/mnt/data04 1 0' : 'dataDir'
'/mnt/data03 0 0' : 'dataDir',
'/mnt/data04 0 0' : 'dataDir'
}
tdSql.createDir('/mnt/data00')
tdSql.createDir('/mnt/data01')
......@@ -51,16 +51,17 @@ class TDTestCase:
tdSql.execute("create database test days 1")
tdSql.execute("use test")
tdSql.execute("create table tb(ts timestamp, c int)")
tdSql.execute("create table stb(ts timestamp, c int) tags(t int)")
for i in range(self.rowsPerTable):
tdSql.execute("insert into tb values(%d, 1)" % (self.ts + i * 86400000))
for i in range(self.ntables):
tdSql.execute("create table tb%d using stb tags(%d)" %(i, i))
tdSql.execute("insert into tb%d values(%d, 1)" % (self.ts + int (i / 100) * 86400000))
tdDnodes.stop(1)
tdDnodes.start(1)
tdSql.query("select * from test.tb")
tdSql.checkRows(10)
tdSql.query("select * from test.stb")
tdSql.checkRows(1000)
def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册