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

add taosdemo-subscribe-testcase

上级 269547eb
......@@ -10,7 +10,7 @@
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 0,
"interlace_rows": 50000,
"num_of_records_per_req": 50000,
"max_sql_len": 1025000,
"databases": [{
......
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "node1",
"host": "127.0.0.1",
"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",
"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": "dy",
"drop": "yes"
"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": "stb2",
"child_table_exists": "no",
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_prefix": "t2_",
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 500,
"batch_create_tbl_num": 1000,
"data_source": "rand",
"insert_mode": "taosc",
"insert_interval": 0,
"insert_rows": 20,
"insert_rows": 10,
"childtable_limit": 0,
"childtable_offset": 0,
"interlace_rows": 0,
"childtable_limit": 10000,
"childtable_offset": 1,
"max_sql_len": 1048576,
"insert_interval": 0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1000,
"start_timestamp": "now",
"sample_format": "",
"sample_file": "",
"start_timestamp": "2021-02-25 10:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"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}]
}]
"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}]
}]
}]
}
\ No newline at end of file
......@@ -35,7 +35,7 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 150,
"childtable_count": 100,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 1000,
......
{
"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"
}]
}
}
\ No newline at end of file
......@@ -12,8 +12,8 @@
"concurrent":2,
"mode":"sync",
"interval":0,
"restart":"yes",
"keepProgress":"yes",
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from stb00_0",
......@@ -30,8 +30,8 @@
"threads":2,
"mode":"sync",
"interval":10000,
"restart":"yes",
"keepProgress":"yes",
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
......
......@@ -12,17 +12,13 @@
"concurrent":2,
"mode":"sync",
"interval":0,
"restartAfterConsume":0,
"restart":"yes",
"restartAfterConsume":1,
"restart":"no",
"keepProgress":"yes",
"sqls": [
{
"sql": "select * from stb00_0",
"result": "./subscribe_res0.txt"
},
{
"sql": "select ts from stb00_1",
"result": "./subscribe_res1.txt"
}]
},
"super_table_query":
......@@ -31,17 +27,13 @@
"threads":2,
"mode":"sync",
"interval":10000,
"restartAfterConsume":0,
"restart":"yes",
"keepProgress":"yes",
"restartAfterConsume":1,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
},
{
"sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ",
"result": "./subscribe_res3.txt"
}]
}
}
\ No newline at end of file
......@@ -221,12 +221,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/insertMaxNumPerReq.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 5000000)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 5000000)
# os.system("%staosdemo -f tools/taosdemoAllTest/insertMaxNumPerReq.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)
......
......@@ -68,11 +68,12 @@ class TDTestCase:
# 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/subSyncKeepStart.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
sleep(1)
os.system("rm -rf ./subscribe_res*")
os.system("rm -rf ./all_subscribe_res*")
# # subscribe: async
# # subscribe: sync
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.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])
......@@ -105,7 +106,6 @@ class TDTestCase:
# # correct data testcase
# os.system("kill -9 %d" % query_pid)
# sleep(3)
# os.system("rm -rf ./subscribe_res*")
......@@ -114,7 +114,10 @@ class TDTestCase:
# sql number lager 100
os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
# 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
# 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/subLzInsert.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/subStb2.json" % binPath)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册