提交 3b0702bc 编写于 作者: haoranc's avatar haoranc

[TD-10465]<test>:modify sml testcase of taosdemo

上级 9c383502
......@@ -35,7 +35,7 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_count": 10,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 1,
......@@ -61,7 +61,7 @@
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_count": 20,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
......
......@@ -41,7 +41,7 @@
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 10000,
"insert_rows": 150,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
......@@ -61,13 +61,13 @@
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 20,
"childtable_count": 15,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 20000,
"insert_rows": 200,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
......
......@@ -41,7 +41,7 @@
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 20000,
"insert_rows": 20,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
......@@ -61,13 +61,13 @@
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_count": 20,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 20000,
"insert_rows": 35,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
......
......@@ -52,17 +52,17 @@ class TDTestCase:
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 1000)
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 1000)
tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000)
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000)
tdSql.checkData(0, 0, 4000)
# insert: create mutiple tables per sql and insert one rows per sql .
......@@ -71,32 +71,32 @@ class TDTestCase:
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20)
tdSql.checkData(0, 0, 15)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10000)
tdSql.checkData(0, 0, 150)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000)
tdSql.checkData(0, 0, 1500)
tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 20000)
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400000)
tdSql.checkData(0, 0, 3000)
# insert: using parament "insert_interval to controls spped of insert.
# but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
tdSql.execute("use db")
tdSql.query("show stables")
tdSql.checkData(0, 4, 100)
tdSql.query("select tbname from stb0")
tdSql.checkRows(100 )
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 20000)
tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 2000000)
tdSql.checkData(0, 0, 2000)
tdSql.query("show stables")
tdSql.checkData(1, 4, 100)
tdSql.checkData(1, 4, 20)
tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 20000)
tdSql.checkData(0, 0, 35)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 2000000)
tdSql.checkData(0, 0, 700)
# spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test
......@@ -208,12 +208,12 @@ class TDTestCase:
tdSql.checkData(0, 0, "2019-10-01 00:00:00")
tdSql.query("select last(ts) from blf.p_0_topics_6 ")
tdSql.checkData(0, 0, "2020-09-29 23:59:00")
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 5000000)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 5000000)
# os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath)
# tdSql.execute("use db")
# tdSql.query("select count(*) from stb0")
# tdSql.checkData(0, 0, 5000000)
# tdSql.query("select count(*) from stb1")
# tdSql.checkData(0, 0, 5000000)
# insert: timestamp and step
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册