diff --git a/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json b/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json index 946d97eab97599bf5dac6c3992702ba290311907..d7f6dbcfa4d618b89131c79d24c46dc89fa8731e 100644 --- a/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json +++ b/tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json @@ -35,7 +35,7 @@ "super_tables": [{ "name": "stb0", "child_table_exists":"no", - "childtable_count": 1000, + "childtable_count": 100, "childtable_prefix": "stb00_", "auto_create_table": "no", "batch_create_tbl_num": 100, @@ -56,6 +56,31 @@ "tags_file": "", "columns": [{"type": "TINYINT", "count":1}], "tags": [{"type": "TINYINT", "count":1}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 100, + "childtable_prefix": "stb01_", + "auto_create_table": "no", + "batch_create_tbl_num": 100, + "data_source": "rand", + "insert_mode": "taosc", + "insert_rows":50000, + "childtable_limit": -1, + "childtable_offset":0, + "interlace_rows": 32767, + "insert_interval":0, + "max_sql_len": 1025000, + "disorder_ratio": 0, + "disorder_range": 1000, + "timestamp_step": 1, + "start_timestamp": "2012-10-01 00:00:00.000", + "sample_format": "csv", + "sample_file": "./sample.csv", + "tags_file": "", + "columns": [{"type": "TINYINT", "count":1}], + "tags": [{"type": "TINYINT", "count":1}] }] }] } diff --git a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json index be93792c2166e61943297527c5066c3baff2b317..70936a271f6a8c24094cc0390c3c7fb21e121f1b 100644 --- a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json @@ -35,13 +35,13 @@ "super_tables": [{ "name": "stb0", "child_table_exists":"no", - "childtable_count": 100, + "childtable_count": 150, "childtable_prefix": "stb00_", "auto_create_table": "no", "batch_create_tbl_num": 1000, "data_source": "rand", "insert_mode": "taosc", - "insert_rows": 20, + "insert_rows": 10, "childtable_limit": 0, "childtable_offset": 0, "interlace_rows": 0, diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncMaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subSyncMaxsql100.json deleted file mode 100644 index 87c8a1129abd4e10765987584cbe2cca65672bea..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/subSyncMaxsql100.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "filetype":"subscribe", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "databases": "db", - "confirm_parameter_prompt": "no", - "specified_table_query": - { - "concurrent":2, - "mode":"sync", - "interval":1000, - "restart":"no", - "keepProgress":"no", - "sqls": [ - { - "sql": "select * from stb0", - "result": "./subscribe_res0.txt" - }] - }, - "super_table_query": - { - "stblname": "stb0", - "threads":2, - "mode":"sync", - "interval":0, - "restart":"no", - "keepProgress":"no", - "sqls": [ - { - "sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ", - "result": "./subscribe_res2.txt" - }] - } -} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100.json new file mode 100644 index 0000000000000000000000000000000000000000..96612e9c94d388cf5e5d8a57ac4ea9ff7a5e97bb --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100.json @@ -0,0 +1,439 @@ +{ + "filetype":"subscribe", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "databases": "db", + "confirm_parameter_prompt": "no", + "specified_table_query": + { + "concurrent":2, + "mode":"sync", + "interval":0, + "restart":"no", + "keepProgress":"no", + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "./subscribe_res1.txt" + }, + { + "sql": "select * from stb00_1", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_2", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_3", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_4", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_5", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_6", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_7", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_8", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_9", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_10 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_11 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_12 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_13 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_14 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_15 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_16 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_17 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_18 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_19 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_20 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_21 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_22 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_23 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_24 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_25 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_26 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_27 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_28 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_29 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_30 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_31 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_32 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_33 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_34 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_35 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_36 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_37 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_38 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_39 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_40 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_41 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_42 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_43 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_44 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_45 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_46 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_47 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_48 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_49 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_50 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_51 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_52 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_53 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_54 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_55 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_56 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_57 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_58 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_59 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_60", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_61", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_62", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_63", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_64", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_65", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_66", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_67", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_68", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_69", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_70 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_71 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_72 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_73 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_74 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_75 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_76 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_77 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_78 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_79 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_80 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_81 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_82 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_83 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_84 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_85 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_86 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_87 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_88 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_89 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_90 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_91 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_92 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_93 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_94 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_95 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_96 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_97 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_98 ", + "result": "./subscribe_res0.txt" + }, + { + "sql": "select * from stb00_99 ", + "result": "./subscribe_res0.txt" + + }, + { + "sql": "select * from stb00_99 ", + "result": "./subscribe_res0.txt" + + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":0, + "restart":"no", + "keepProgress":"no", + "sqls": [ + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ", + "result": "./subscribe_res2.txt" + }] + } +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/subSupermaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json similarity index 86% rename from tests/pytest/tools/taosdemoAllTest/subSupermaxsql100.json rename to tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json index 5eb7a3f03045c8aead2fb4991795760908bcb3e6..6e8c8b4a1d90d286b3802e03cfc100b6d1a80664 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSupermaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json @@ -17,11 +17,11 @@ "keepProgress":"no", "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:00.000' ", "result": "./subscribe_res2.txt" }, { - "sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ", + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", "result": "./subscribe_res3.txt" }] } diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py index ca128a6a4fe10f3e06347972a0349605cde3439b..9e03c29536ef0b3790d51d5b01bb0c02498ce1da 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py @@ -224,6 +224,9 @@ class TDTestCase: 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) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py index f09be03834519cafa9f159a69b74af7ecf8e20e0..3746cad63e53e824818d1ca9db74bcb822710f42 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py @@ -111,9 +111,30 @@ class TDTestCase: # os.system("rm -rf ./subscribe_res*") # os.system("rm -rf ./all_subscribe*") - # query times less than or equal to 100 + # sql number lager 100 os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) - os.system("%staosdemo -f tools/taosdemoAllTest/subSyncMaxsql100.json" % binPath) + # assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) !=0 + os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) + + # # # merge result files + # os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt") + # os.system("cat subscribe_res1.txt* > all_subscribe_res1.txt") + # os.system("cat subscribe_res2.txt* > all_subscribe_res2.txt") + # # os.system("cat subscribe_res3.txt* > all_subscribe_res3.txt") + + # sleep(3) + + # # correct subscribeTimes testcase + # subTimes0 = self.subTimes("all_subscribe_res0.txt") + # self.assertCheck("all_subscribe_res0.txt",subTimes0 ,3960) + + # subTimes1 = self.subTimes("all_subscribe_res1.txt") + # self.assertCheck("all_subscribe_res1.txt",subTimes1 ,40) + + # subTimes2 = self.subTimes("all_subscribe_res2.txt") + # self.assertCheck("all_subscribe_res2.txt",subTimes2 ,1900) + + # os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath) # os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)