diff --git a/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json b/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json index d7f6dbcfa4d618b89131c79d24c46dc89fa8731e..91234d5e48af891c4dfd0fdfd88121e123bf4edc 100644 --- a/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json +++ b/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json @@ -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": [{ diff --git a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json new file mode 100644 index 0000000000000000000000000000000000000000..d4bae6b274ec9b0bcace20ef64597bf2c122b2b0 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json @@ -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}] + }] + }] +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json index 70936a271f6a8c24094cc0390c3c7fb21e121f1b..d4bae6b274ec9b0bcace20ef64597bf2c122b2b0 100644 --- a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json @@ -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, diff --git a/tests/pytest/tools/taosdemoAllTest/subLzInsert.json b/tests/pytest/tools/taosdemoAllTest/subLzInsert.json deleted file mode 100644 index 415e0c461f612ad369498deb251194684eaf34cb..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/subLzInsert.json +++ /dev/null @@ -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}] - }] - }] -} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/subStb2.json b/tests/pytest/tools/taosdemoAllTest/subStb2.json deleted file mode 100644 index 73c175837fcb002ab734a8050995e74806c64245..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/subStb2.json +++ /dev/null @@ -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" - }] - } - - } \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/subSync.json b/tests/pytest/tools/taosdemoAllTest/subSync.json index 4388d513e7ddebee34421d8857df4e05654c07d7..aa0b2cd7a4b454fd3332d72a521d244b5e567869 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSync.json +++ b/tests/pytest/tools/taosdemoAllTest/subSync.json @@ -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' ", diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json b/tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json index 431f7f52d8b0ad53ce66d9465acdcd9fa943ff6b..fcd0d46e961ac48b66116c54132c31ef151b3b3b 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json +++ b/tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json @@ -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 diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py index 9e03c29536ef0b3790d51d5b01bb0c02498ce1da..2b2dd8d7393bcb5c1393148c5d166c8d3ef46a49 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py @@ -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) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py index 3746cad63e53e824818d1ca9db74bcb822710f42..5702b5a81f7b89c7ac649e9dd7f4553f50b3fdb0 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py @@ -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) +