提交 02d6309f 编写于 作者: haoranc's avatar haoranc

[TD-10789]<test>:verify all data types in the taosdemo test of sml interface

上级 ed4e0033
......@@ -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,
......@@ -55,13 +55,13 @@
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "TIMESTAMP"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}],
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}],
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_count": 20,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
......
......@@ -35,14 +35,14 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 2,
"childtable_count": 1,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "json" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 0,
......@@ -59,16 +59,16 @@
"tags": [{"type": "INT", "count":1}]
},
{
"name": "stb2",
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 4,
"childtable_count": 2,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "json" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......
......@@ -35,14 +35,14 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 2,
"childtable_count": 1,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 0,
......@@ -61,14 +61,14 @@
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_count": 2,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -87,14 +87,14 @@
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 4,
"childtable_count": 3,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -113,14 +113,14 @@
{
"name": "stb3",
"child_table_exists":"no",
"childtable_count": 5,
"childtable_count": 4,
"childtable_prefix": "stb03_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -139,14 +139,14 @@
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 6,
"childtable_count": 5,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":30,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -165,14 +165,14 @@
{
"name": "stb5",
"child_table_exists":"no",
"childtable_count": 15,
"childtable_count": 6,
"childtable_prefix": "stb05_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":20,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -191,7 +191,7 @@
{
"name": "stb6",
"child_table_exists":"no",
"childtable_count": 20,
"childtable_count": 7,
"childtable_prefix": "stb06_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
......@@ -217,14 +217,14 @@
{
"name": "stb7",
"child_table_exists":"no",
"childtable_count": 30,
"childtable_count": 8 ,
"childtable_prefix": "stb07_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":5,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -243,14 +243,14 @@
{
"name": "stb8",
"child_table_exists":"no",
"childtable_count": 20,
"childtable_count": 9,
"childtable_prefix": "stb08_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":30,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -269,14 +269,14 @@
{
"name": "stb9",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_count": 10,
"childtable_prefix": "stb09_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -295,14 +295,14 @@
{
"name": "stb10",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_count": 11,
"childtable_prefix": "stb10_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -321,14 +321,14 @@
{
"name": "stb11",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_count": 12,
"childtable_prefix": "stb11_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......@@ -347,14 +347,14 @@
{
"name": "stb12",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_count": 13,
"childtable_prefix": "stb12_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"insert_rows":10,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
......
......@@ -48,7 +48,7 @@ class TDTestCase:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
# taosc interface
os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
......@@ -81,54 +81,45 @@ class TDTestCase:
tdSql.checkData(0, 0, 200000)
# insert-interface: sml
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-allDataType-sml.json -y " % binPath)
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-allDataType-sml.json -y " % binPath)
tdSql.execute("use db")
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.query("select last(ts) from db.stb00_0")
tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
# tdSql.query("select last(ts) from db.stb00_0")
# tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 200)
tdSql.query("select last(ts) from db.stb01_0")
tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.checkData(0, 0, 1000)
# tdSql.query("select last(ts) from db.stb01_0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400)
tdSql.checkData(0, 0, 4000)
# insert-interface: sml-json
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath)
tdSql.execute("use db")
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.query("select last(ts) from db.stb00_0")
tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 200)
tdSql.query("select last(ts) from db.stb01_0")
tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400)
# # insert-interface: sml-json
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath)
# tdSql.execute("use db")
# tdSql.query("show stables")
# for i in range(13):
# for j in range(13):
# if tdSql.queryResult[i][0] == 'stb%d'%j:
# # print(i,"stb%d"%j)
# tdSql.checkData(i, 4, j+1)
# insert-interface: sml-telnet
os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json -y " % binPath)
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json -y " % binPath)
tdSql.execute("use db")
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.query("select last(ts) from db.stb00_0")
tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 200)
tdSql.query("select last(ts) from db.stb01_0")
tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400)
tdSql.query("show stables")
for i in range(13):
for j in range(13):
if tdSql.queryResult[i][0] == 'stb%d'%j:
# print(i,"stb%d"%j)
tdSql.checkData(i, 4, j+1)
for i in range(13):
tdSql.query("select count(*) from stb%d"%i)
tdSql.checkData(0, 0, (i+1)*10)
# insert-interface: sml-telnet
assert os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-timestamp.json -y " % binPath) !=0
......
......@@ -74,22 +74,22 @@ class TDTestCase:
tdSql.query("select count(*) from stb1")
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("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
tdSql.execute("use db")
tdSql.query("select tbname from stb0")
tdSql.checkRows(100 )
# tdSql.query("select count(*) from stb00_0")
# tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 2000)
tdSql.query("show stables")
tdSql.checkData(1, 4, 20)
# tdSql.query("select count(*) from stb01_0")
# tdSql.checkData(0, 0, 35)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 700)
# # 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("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
# tdSql.execute("use db")
# tdSql.query("select tbname from db.stb0")
# tdSql.checkRows(100 )
# # tdSql.query("select count(*) from stb00_0")
# # tdSql.checkData(0, 0, 20)
# tdSql.query("select count(*) from stb0")
# tdSql.checkData(0, 0, 2000)
# tdSql.query("show stables")
# tdSql.checkData(1, 4, 20)
# # tdSql.query("select count(*) from stb01_0")
# # tdSql.checkData(0, 0, 35)
# tdSql.query("select count(*) from stb1")
# tdSql.checkData(0, 0, 700)
# spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test
......@@ -134,10 +134,10 @@ class TDTestCase:
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
# tdSql.query("select count(*) from db.stb0")
# tdSql.checkData(0, 0, 10000)
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath)
tdSql.query("select count(*) from db.stb0")
tdSql.checkRows(0)
# tdSql.execute("drop database if exists db")
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath)
# tdSql.query("select count(*) from db.stb0")
# tdSql.checkRows(0)
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath)
tdSql.execute("use db")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册