提交 731397a2 编写于 作者: J jiajingbin

[TD-6482]<test>: add 4 testcases for issue-7666

上级 0ff7bcc0
...@@ -393,6 +393,7 @@ python3 ./test.py -f alter/alterColMultiTimes.py ...@@ -393,6 +393,7 @@ python3 ./test.py -f alter/alterColMultiTimes.py
python3 ./test.py -f query/queryWildcardLength.py python3 ./test.py -f query/queryWildcardLength.py
python3 ./test.py -f query/queryTbnameUpperLower.py python3 ./test.py -f query/queryTbnameUpperLower.py
python3 ./test.py -f query/queryGroupTbname.py python3 ./test.py -f query/queryGroupTbname.py
python3 ./test.py -f insert/verifyMemToDiskCrash.py
#======================p4-end=============== #======================p4-end===============
......
...@@ -41,9 +41,8 @@ class TDTestCase: ...@@ -41,9 +41,8 @@ class TDTestCase:
tdSql.checkEqual(res1[i], res2[i]) tdSql.checkEqual(res1[i], res2[i])
def checkStbMemDiskMerge(self): def checkStbMemDiskMerge(self):
tdCom.cleanTb() stb_name = tdCom.getLongName(7, "letters")
stb_name = tdCom.getLongName(8, "letters") tb_name = f'{stb_name}_sub'
tb_name = tdCom.getLongName(7, "letters")
tdSql.execute( tdSql.execute(
f'CREATE TABLE {stb_name} (ts timestamp, c1 int, c2 int) tags (t1 int)') f'CREATE TABLE {stb_name} (ts timestamp, c1 int, c2 int) tags (t1 int)')
tdSql.execute( tdSql.execute(
...@@ -65,13 +64,12 @@ class TDTestCase: ...@@ -65,13 +64,12 @@ class TDTestCase:
tdSql.checkEqual(res1[i], res2[i]) tdSql.checkEqual(res1[i], res2[i])
def checkTbSuperSubBlockMerge(self): def checkTbSuperSubBlockMerge(self):
tdCom.cleanTb() tb_name = tdCom.getLongName(6, "letters")
tb_name = tdCom.getLongName(8, "letters")
tdSql.execute( tdSql.execute(
f'CREATE TABLE {tb_name} (ts timestamp, c1 int)') f'CREATE TABLE {tb_name} (ts timestamp, c1 int)')
start_ts = 1577808001000 start_ts = 1577808001000
for i in range(80): for i in range(10):
tdSql.execute( tdSql.execute(
f'insert into {tb_name} values ({start_ts}, {i})') f'insert into {tb_name} values ({start_ts}, {i})')
start_ts += 1 start_ts += 1
...@@ -92,16 +90,15 @@ class TDTestCase: ...@@ -92,16 +90,15 @@ class TDTestCase:
tdSql.query(f'select * from {tb_name}') tdSql.query(f'select * from {tb_name}')
def checkStbSuperSubBlockMerge(self): def checkStbSuperSubBlockMerge(self):
tdCom.cleanTb() stb_name = tdCom.getLongName(5, "letters")
stb_name = tdCom.getLongName(8, "letters") tb_name = f'{stb_name}_sub'
tb_name = tdCom.getLongName(7, "letters")
tdSql.execute( tdSql.execute(
f'CREATE TABLE {stb_name} (ts timestamp, c1 int) tags (t1 int)') f'CREATE TABLE {stb_name} (ts timestamp, c1 int) tags (t1 int)')
tdSql.execute( tdSql.execute(
f'CREATE TABLE {tb_name} using {stb_name} tags (1)') f'CREATE TABLE {tb_name} using {stb_name} tags (1)')
start_ts = 1577808001000 start_ts = 1577808001000
for i in range(79): for i in range(10):
tdSql.execute( tdSql.execute(
f'insert into {tb_name} values ({start_ts}, {i})') f'insert into {tb_name} values ({start_ts}, {i})')
start_ts += 1 start_ts += 1
...@@ -127,10 +124,10 @@ class TDTestCase: ...@@ -127,10 +124,10 @@ class TDTestCase:
self.checkStbMemDiskMerge() self.checkStbMemDiskMerge()
self.checkTbSuperSubBlockMerge() self.checkTbSuperSubBlockMerge()
self.checkStbSuperSubBlockMerge() self.checkStbSuperSubBlockMerge()
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success("%s successfully executed" % __file__) tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase()) tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase()) tdCases.addLinux(__file__, TDTestCase())
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册