提交 9c383502 编写于 作者: haoranc's avatar haoranc

[TD-10789]<test>:modify testcase of taosdemo that remark useless funtion

上级 7bcc880f
...@@ -99,10 +99,11 @@ class TDTestCase: ...@@ -99,10 +99,11 @@ class TDTestCase:
tdSql.checkData(0, 0, 2000000) tdSql.checkData(0, 0, 2000000)
# spend 2min30s for 3 testcases. # spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test # insert: drop and child_table_exists combination test
# insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset # insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath)
tdSql.error("show dbno.stables") # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath)
# tdSql.error("show dbno.stables")
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y" % binPath) os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y" % binPath)
tdSql.execute("use db") tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0") tdSql.query("select count (tbname) from stb0")
...@@ -115,30 +116,30 @@ class TDTestCase: ...@@ -115,30 +116,30 @@ class TDTestCase:
tdSql.checkData(0, 0, 8) tdSql.checkData(0, 0, 8)
tdSql.query("select count (tbname) from stb4") tdSql.query("select count (tbname) from stb4")
tdSql.checkData(0, 0, 8) tdSql.checkData(0, 0, 8)
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-offset-sml.json -y" % binPath) # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-offset-sml.json -y" % binPath)
tdSql.execute("use db") # tdSql.execute("use db")
tdSql.query("select count(*) from stb0") # tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 50) # tdSql.checkData(0, 0, 50)
tdSql.query("select count(*) from stb1") # tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 240) # tdSql.checkData(0, 0, 240)
tdSql.query("select count(*) from stb2") # tdSql.query("select count(*) from stb2")
tdSql.checkData(0, 0, 220) # tdSql.checkData(0, 0, 220)
tdSql.query("select count(*) from stb3") # tdSql.query("select count(*) from stb3")
tdSql.checkData(0, 0, 180) # tdSql.checkData(0, 0, 180)
tdSql.query("select count(*) from stb4") # tdSql.query("select count(*) from stb4")
tdSql.checkData(0, 0, 160) # tdSql.checkData(0, 0, 160)xxxxxxxxx
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newtable-sml.json -y" % binPath) # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newtable-sml.json -y" % binPath)
tdSql.execute("use db") # tdSql.execute("use db")
tdSql.query("select count(*) from stb0") # tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 150) # tdSql.checkData(0, 0, 150)
tdSql.query("select count(*) from stb1") # tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 360) # tdSql.checkData(0, 0, 360)
tdSql.query("select count(*) from stb2") # tdSql.query("select count(*) from stb2")
tdSql.checkData(0, 0, 360) # tdSql.checkData(0, 0, 360)
tdSql.query("select count(*) from stb3") # tdSql.query("select count(*) from stb3")
tdSql.checkData(0, 0, 340) # tdSql.checkData(0, 0, 340)
tdSql.query("select count(*) from stb4") # tdSql.query("select count(*) from stb4")
tdSql.checkData(0, 0, 400) # tdSql.checkData(0, 0, 400)
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y" % binPath) os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y" % binPath)
tdSql.execute("use db") tdSql.execute("use db")
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
...@@ -265,41 +266,41 @@ class TDTestCase: ...@@ -265,41 +266,41 @@ class TDTestCase:
tdSql.checkData(0, 0, 15000) tdSql.checkData(0, 0, 15000)
# insert: auto_create # # insert: auto_create
tdSql.execute('drop database if exists db') # tdSql.execute('drop database if exists db')
tdSql.execute('create database db') # tdSql.execute('create database db')
tdSql.execute('use db') # tdSql.execute('use db')
os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json " % binPath) # drop = no, child_table_exists, auto_create_table varies # os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-N00-sml.json " % binPath) # drop = no, child_table_exists, auto_create_table varies
tdSql.execute('use db') # tdSql.execute('use db')
tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123 # tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'NNN%\'') #child_table_exists = no, auto_create_table varies = no # tdSql.query('show tables like \'NNN%\'') #child_table_exists = no, auto_create_table varies = no
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'NNY%\'') #child_table_exists = no, auto_create_table varies = yes # tdSql.query('show tables like \'NNY%\'') #child_table_exists = no, auto_create_table varies = yes
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'NYN%\'') #child_table_exists = yes, auto_create_table varies = no # tdSql.query('show tables like \'NYN%\'') #child_table_exists = yes, auto_create_table varies = no
tdSql.checkRows(0) # tdSql.checkRows(0)
tdSql.query('show tables like \'NY123%\'') #child_table_exists = yes, auto_create_table varies = 123 # tdSql.query('show tables like \'NY123%\'') #child_table_exists = yes, auto_create_table varies = 123
tdSql.checkRows(0) # tdSql.checkRows(0)
tdSql.query('show tables like \'NYY%\'') #child_table_exists = yes, auto_create_table varies = yes # tdSql.query('show tables like \'NYY%\'') #child_table_exists = yes, auto_create_table varies = yes
tdSql.checkRows(0) # tdSql.checkRows(0)
tdSql.execute('drop database if exists db') # tdSql.execute('drop database if exists db')
os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies # os.system("%staosdemo -y -f tools/taosdemoAllTest/sml/insert-drop-exist-auto-Y00-sml.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies
tdSql.execute('use db') # tdSql.execute('use db')
tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123 # tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'YNN%\'') #child_table_exists = no, auto_create_table varies = no # tdSql.query('show tables like \'YNN%\'') #child_table_exists = no, auto_create_table varies = no
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'YNY%\'') #child_table_exists = no, auto_create_table varies = yes # tdSql.query('show tables like \'YNY%\'') #child_table_exists = no, auto_create_table varies = yes
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'YYN%\'') #child_table_exists = yes, auto_create_table varies = no # tdSql.query('show tables like \'YYN%\'') #child_table_exists = yes, auto_create_table varies = no
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'YY123%\'') #child_table_exists = yes, auto_create_table varies = 123 # tdSql.query('show tables like \'YY123%\'') #child_table_exists = yes, auto_create_table varies = 123
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes # tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes
tdSql.checkRows(20) # tdSql.checkRows(20)
testcaseFilename = os.path.split(__file__)[-1] testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf ./insert_res.txt") os.system("rm -rf ./insert_res.txt")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册