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

[TD-11861]<test>: modify testcase that it will exit without continuing...

[TD-11861]<test>: modify testcase that it will exit without continuing execution when json files have been checked unsuccessfully
上级 3bae56e9
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
......@@ -109,58 +109,6 @@
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
......@@ -109,58 +109,6 @@
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
......@@ -109,58 +109,6 @@
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
......@@ -68,21 +68,21 @@ class TDTestCase:
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 2000)
# restful connector insert data
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertRestful.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, 10)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200)
# # restful connector insert data
# os.system("%staosBenchmark -f tools/taosdemoAllTest/insertRestful.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, 10)
# tdSql.query("select count(*) from stb00_0")
# tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from stb0")
# tdSql.checkData(0, 0, 100)
# tdSql.query("select count(*) from stb01_1")
# tdSql.checkData(0, 0, 20)
# tdSql.query("select count(*) from stb1")
# tdSql.checkData(0, 0, 200)
# default values json files
tdSql.execute("drop database if exists db")
......@@ -103,30 +103,30 @@ class TDTestCase:
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10000)
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_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, 4000)
# 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/insert-interval-speed.json -y" % binPath)
tdSql.execute("use db")
tdSql.query("show stables")
tdSql.checkData(0, 4, 100)
tdSql.checkData(0, 4, 10)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 20000)
tdSql.checkData(0, 0, 200)
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, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 2000000)
tdSql.checkData(0, 0, 4000)
# spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test
......@@ -218,6 +218,10 @@ class TDTestCase:
tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1)
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151-error.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y " % binPath)
tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db")
......
......@@ -56,12 +56,8 @@ class TDTestCase:
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
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, 1000)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 4000)
......@@ -73,12 +69,8 @@ class TDTestCase:
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 15)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 150)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 1500)
tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 3000)
......@@ -88,14 +80,14 @@ class TDTestCase:
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 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 stb01_0")
# tdSql.checkData(0, 0, 35)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 700)
......@@ -160,11 +152,13 @@ class TDTestCase:
tdSql.checkRows(1)
tdSql.query("select count(*) from db.stb1")
tdSql.checkRows(1)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1)
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-error-sml.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath)
tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db")
......@@ -211,12 +205,12 @@ class TDTestCase:
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.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)
......
......@@ -187,6 +187,10 @@ class TDTestCase:
tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1)
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y " % binPath)
tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册