add taosdemo-subscribe-testcase
This commit is contained in:
parent
269547ebd3
commit
f321ba919f
|
@ -10,7 +10,7 @@
|
||||||
"result_file": "./insert_res.txt",
|
"result_file": "./insert_res.txt",
|
||||||
"confirm_parameter_prompt": "no",
|
"confirm_parameter_prompt": "no",
|
||||||
"insert_interval": 0,
|
"insert_interval": 0,
|
||||||
"interlace_rows": 0,
|
"interlace_rows": 50000,
|
||||||
"num_of_records_per_req": 50000,
|
"num_of_records_per_req": 50000,
|
||||||
"max_sql_len": 1025000,
|
"max_sql_len": 1025000,
|
||||||
"databases": [{
|
"databases": [{
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"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": 0,
|
||||||
|
"num_of_records_per_req": 3000,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"databases": [{
|
||||||
|
"dbinfo": {
|
||||||
|
"name": "db",
|
||||||
|
"drop": "yes",
|
||||||
|
"replica": 1,
|
||||||
|
"days": 10,
|
||||||
|
"cache": 16,
|
||||||
|
"blocks": 8,
|
||||||
|
"precision": "ms",
|
||||||
|
"keep": 365,
|
||||||
|
"minRows": 100,
|
||||||
|
"maxRows": 4096,
|
||||||
|
"comp":2,
|
||||||
|
"walLevel":1,
|
||||||
|
"cachelast":0,
|
||||||
|
"quorum":1,
|
||||||
|
"fsync":3000,
|
||||||
|
"update": 0
|
||||||
|
},
|
||||||
|
"super_tables": [{
|
||||||
|
"name": "stb0",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"childtable_count": 100,
|
||||||
|
"childtable_prefix": "stb00_",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"batch_create_tbl_num": 1000,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 10,
|
||||||
|
"childtable_limit": 0,
|
||||||
|
"childtable_offset": 0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval": 0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 1000,
|
||||||
|
"start_timestamp": "2021-02-25 10:00:00.000",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "BINARY", "len": 1, "count":1}, {"type": "BINARY", "len": 3, "count":1}, {"type": "INT"}, {"type": "DOUBLE", "count":1}],
|
||||||
|
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}
|
|
@ -35,7 +35,7 @@
|
||||||
"super_tables": [{
|
"super_tables": [{
|
||||||
"name": "stb0",
|
"name": "stb0",
|
||||||
"child_table_exists":"no",
|
"child_table_exists":"no",
|
||||||
"childtable_count": 150,
|
"childtable_count": 100,
|
||||||
"childtable_prefix": "stb00_",
|
"childtable_prefix": "stb00_",
|
||||||
"auto_create_table": "no",
|
"auto_create_table": "no",
|
||||||
"batch_create_tbl_num": 1000,
|
"batch_create_tbl_num": 1000,
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"filetype": "insert",
|
|
||||||
"cfgdir": "/etc/taos",
|
|
||||||
"host": "node1",
|
|
||||||
"port": 6030,
|
|
||||||
"user": "root",
|
|
||||||
"password": "taosdata",
|
|
||||||
"thread_count": 4,
|
|
||||||
"thread_count_create_tbl": 4,
|
|
||||||
"num_of_records_per_req": 10000,
|
|
||||||
"result_file": "insert_stb1.txt",
|
|
||||||
"confirm_parameter_prompt": "no",
|
|
||||||
"databases": [{
|
|
||||||
"dbinfo": {
|
|
||||||
"name": "dy",
|
|
||||||
"drop": "yes"
|
|
||||||
},
|
|
||||||
"super_tables": [{
|
|
||||||
"name": "stb2",
|
|
||||||
"child_table_exists": "no",
|
|
||||||
"childtable_count": 100,
|
|
||||||
"childtable_prefix": "t2_",
|
|
||||||
"auto_create_table": "no",
|
|
||||||
"batch_create_tbl_num": 500,
|
|
||||||
"data_source": "rand",
|
|
||||||
"insert_mode": "taosc",
|
|
||||||
"insert_interval": 0,
|
|
||||||
"insert_rows": 20,
|
|
||||||
"interlace_rows": 0,
|
|
||||||
"childtable_limit": 10000,
|
|
||||||
"childtable_offset": 1,
|
|
||||||
"max_sql_len": 1048576,
|
|
||||||
"disorder_ratio": 0,
|
|
||||||
"disorder_range": 1000,
|
|
||||||
"timestamp_step": 1000,
|
|
||||||
"start_timestamp": "now",
|
|
||||||
"sample_format": "",
|
|
||||||
"sample_file": "",
|
|
||||||
"tags_file": "",
|
|
||||||
"columns": [{"type": "DOUBLE","count":1},{"type": "TIMESTAMP","count":1},{"type": "SMALLINT","count":2}],
|
|
||||||
"tags": [{"type": "INT","count":1},{"type": "BINARY","len": 32,"count":11},{"type": "NCHAR","len": 64,"count":4}]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"filetype":"subscribe",
|
|
||||||
"cfgdir": "/etc/taos",
|
|
||||||
"host": "node1",
|
|
||||||
"port": 6030,
|
|
||||||
"user": "root",
|
|
||||||
"password": "taosdata",
|
|
||||||
"databases": "dy",
|
|
||||||
"confirm_parameter_prompt": "no",
|
|
||||||
"specified_table_query":
|
|
||||||
{
|
|
||||||
"concurrent":1,
|
|
||||||
"mode":"sync",
|
|
||||||
"interval": 0,
|
|
||||||
"restart":"no",
|
|
||||||
"keepProgress":"no",
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select * from stb2 where ts>'2021-01-01 09:35:00.000' ;",
|
|
||||||
"result": "./sub_stb2.txt"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -12,8 +12,8 @@
|
||||||
"concurrent":2,
|
"concurrent":2,
|
||||||
"mode":"sync",
|
"mode":"sync",
|
||||||
"interval":0,
|
"interval":0,
|
||||||
"restart":"yes",
|
"restart":"no",
|
||||||
"keepProgress":"yes",
|
"keepProgress":"no",
|
||||||
"sqls": [
|
"sqls": [
|
||||||
{
|
{
|
||||||
"sql": "select * from stb00_0",
|
"sql": "select * from stb00_0",
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
"threads":2,
|
"threads":2,
|
||||||
"mode":"sync",
|
"mode":"sync",
|
||||||
"interval":10000,
|
"interval":10000,
|
||||||
"restart":"yes",
|
"restart":"no",
|
||||||
"keepProgress":"yes",
|
"keepProgress":"no",
|
||||||
"sqls": [
|
"sqls": [
|
||||||
{
|
{
|
||||||
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
|
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
|
||||||
|
|
|
@ -12,17 +12,13 @@
|
||||||
"concurrent":2,
|
"concurrent":2,
|
||||||
"mode":"sync",
|
"mode":"sync",
|
||||||
"interval":0,
|
"interval":0,
|
||||||
"restartAfterConsume":0,
|
"restartAfterConsume":1,
|
||||||
"restart":"yes",
|
"restart":"no",
|
||||||
"keepProgress":"yes",
|
"keepProgress":"yes",
|
||||||
"sqls": [
|
"sqls": [
|
||||||
{
|
{
|
||||||
"sql": "select * from stb00_0",
|
"sql": "select * from stb00_0",
|
||||||
"result": "./subscribe_res0.txt"
|
"result": "./subscribe_res0.txt"
|
||||||
},
|
|
||||||
{
|
|
||||||
"sql": "select ts from stb00_1",
|
|
||||||
"result": "./subscribe_res1.txt"
|
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"super_table_query":
|
"super_table_query":
|
||||||
|
@ -31,17 +27,13 @@
|
||||||
"threads":2,
|
"threads":2,
|
||||||
"mode":"sync",
|
"mode":"sync",
|
||||||
"interval":10000,
|
"interval":10000,
|
||||||
"restartAfterConsume":0,
|
"restartAfterConsume":1,
|
||||||
"restart":"yes",
|
"restart":"no",
|
||||||
"keepProgress":"yes",
|
"keepProgress":"no",
|
||||||
"sqls": [
|
"sqls": [
|
||||||
{
|
{
|
||||||
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
|
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
|
||||||
"result": "./subscribe_res2.txt"
|
"result": "./subscribe_res2.txt"
|
||||||
},
|
|
||||||
{
|
|
||||||
"sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ",
|
|
||||||
"result": "./subscribe_res3.txt"
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -221,12 +221,12 @@ class TDTestCase:
|
||||||
# tdSql.checkData(0, 0, "2019-10-01 00:00:00")
|
# tdSql.checkData(0, 0, "2019-10-01 00:00:00")
|
||||||
# tdSql.query("select last(ts) from blf.p_0_topics_6 ")
|
# tdSql.query("select last(ts) from blf.p_0_topics_6 ")
|
||||||
# tdSql.checkData(0, 0, "2020-09-29 23:59:00")
|
# tdSql.checkData(0, 0, "2020-09-29 23:59:00")
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/insertMaxNumPerReq.json -y " % binPath)
|
# os.system("%staosdemo -f tools/taosdemoAllTest/insertMaxNumPerReq.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, 5000000)
|
# tdSql.checkData(0, 0, 5000000)
|
||||||
tdSql.query("select count(*) from stb0")
|
# tdSql.query("select count(*) from stb1")
|
||||||
tdSql.checkData(0, 0, 5000000)
|
# tdSql.checkData(0, 0, 5000000)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,12 @@ class TDTestCase:
|
||||||
|
|
||||||
# clear env
|
# clear env
|
||||||
os.system("ps -ef |grep 'taosdemoAllTest/subSync.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
|
os.system("ps -ef |grep 'taosdemoAllTest/subSync.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
|
||||||
|
os.system("ps -ef |grep 'taosdemoAllTest/subSyncKeepStart.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
os.system("rm -rf ./subscribe_res*")
|
os.system("rm -rf ./subscribe_res*")
|
||||||
os.system("rm -rf ./all_subscribe_res*")
|
os.system("rm -rf ./all_subscribe_res*")
|
||||||
|
|
||||||
# # subscribe: async
|
# # subscribe: sync
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath)
|
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath)
|
||||||
# os.system("nohup %staosdemo -f tools/taosdemoAllTest/subSync.json &" % binPath)
|
# os.system("nohup %staosdemo -f tools/taosdemoAllTest/subSync.json &" % binPath)
|
||||||
# query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
# query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
||||||
|
@ -105,7 +106,6 @@ class TDTestCase:
|
||||||
|
|
||||||
|
|
||||||
# # correct data testcase
|
# # correct data testcase
|
||||||
|
|
||||||
# os.system("kill -9 %d" % query_pid)
|
# os.system("kill -9 %d" % query_pid)
|
||||||
# sleep(3)
|
# sleep(3)
|
||||||
# os.system("rm -rf ./subscribe_res*")
|
# os.system("rm -rf ./subscribe_res*")
|
||||||
|
@ -114,7 +114,10 @@ class TDTestCase:
|
||||||
# sql number lager 100
|
# sql number lager 100
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
|
os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
|
||||||
# assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) !=0
|
# assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) !=0
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath)
|
# os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath)
|
||||||
|
os.system("%staosdemo -f tools/taosdemoAllTest/subSyncKeepStart.json" % binPath)
|
||||||
|
tdSql.execute("insert into db.stb00_1 values(1614218412000,'R','bf3',8637,78.861045)(1614218413000,'R','bf3',8637,98.861045)")
|
||||||
|
|
||||||
|
|
||||||
# # # merge result files
|
# # # merge result files
|
||||||
# os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt")
|
# os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt")
|
||||||
|
@ -138,8 +141,7 @@ class TDTestCase:
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
|
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
|
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
|
||||||
|
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subLzInsert.json" % binPath)
|
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subStb2.json" % binPath)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue