From 39604d77261c50e264ad26942054c49e1982d442 Mon Sep 17 00:00:00 2001 From: tomchon Date: Fri, 25 Jun 2021 15:21:14 +0800 Subject: [PATCH] [TD-4369]: add testcase of resubscibe --- .../subInsertdataMaxsql100 copy.json | 61 --- .../subInsertdataMaxsql100.json | 25 + .../subSyncResubAC1endAfter1.json} | 8 +- .../subSyncResubAC1endAfterMin1.json | 41 ++ .../subResubjson/subSyncResubACMinus1.json | 41 ++ .../subSyncResubACMinus1endAfter0.json | 41 ++ .../subSyncResubACMinus1endAfterNo0.json | 41 ++ .../taosdemoAllTest/subSyncSpecMaxsql100.json | 2 +- .../subSyncSpecMaxsql100Async.json | 439 ++++++++++++++++++ .../subSyncSuperMaxsql100.json | 405 +++++++++++++++- .../subSyncSuperMaxsql100Async.json | 426 +++++++++++++++++ .../taosdemoTestSubWithJson.py | 55 ++- .../taosdemoTestSubWithJsonAsync.py | 5 +- 13 files changed, 1511 insertions(+), 79 deletions(-) delete mode 100644 tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json rename tests/pytest/tools/taosdemoAllTest/{subSyncKeepStart.json => subResubjson/subSyncResubAC1endAfter1.json} (88%) create mode 100644 tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json create mode 100644 tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json create mode 100644 tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json create mode 100644 tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfterNo0.json create mode 100644 tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100Async.json create mode 100644 tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100Async.json diff --git a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json deleted file mode 100644 index 80d47b2a8f..0000000000 --- a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "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": 200, - "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 80d47b2a8f..d5d0578f07 100644 --- a/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json @@ -56,6 +56,31 @@ "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}] + }, + { + "name": "stb1", + "child_table_exists":"no", + "childtable_count": 20, + "childtable_prefix": "stb01_", + "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/subSyncKeepStart.json b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfter1.json similarity index 88% rename from tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json rename to tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfter1.json index 5bc6be99f0..93462d2c66 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json +++ b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfter1.json @@ -12,9 +12,10 @@ "concurrent":2, "mode":"sync", "interval":0, - "keepProgress":"no", - "restart":"yes", "resubAfterConsume":1, + "endAfterConsume":1, + "keepProgress":"yes", + "restart":"no", "sqls": [ { "sql": "select * from stb00_0", @@ -27,9 +28,10 @@ "threads":2, "mode":"sync", "interval":1000, + "resubAfterConsume":1, + "endAfterConsume":1, "keepProgress":"yes", "restart":"no", - "resubAfterConsume":1, "sqls": [ { "sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ", diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json new file mode 100644 index 0000000000..4229f304e4 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json @@ -0,0 +1,41 @@ +{ + "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, + "resubAfterConsume":1, + "endAfterConsume":-1, + "keepProgress":"no", + "restart":"yes", + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "./subscribe_res0.txt" + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":1000, + "resubAfterConsume":1, + "endAfterConsume":-1, + "keepProgress":"no", + "restart":"yes", + "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/subResubjson/subSyncResubACMinus1.json b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json new file mode 100644 index 0000000000..ac22190565 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json @@ -0,0 +1,41 @@ +{ + "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, + "resubAfterConsume":-1, + "endAfterConsume":-1, + "keepProgress":"no", + "restart":"yes", + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "./subscribe_res0.txt" + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":1000, + "resubAfterConsume":-1, + "endAfterConsume":-1, + "keepProgress":"no", + "restart":"yes", + "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/subResubjson/subSyncResubACMinus1endAfter0.json b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json new file mode 100644 index 0000000000..7d937212c9 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json @@ -0,0 +1,41 @@ +{ + "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, + "resubAfterConsume":-1, + "endAfterConsume":0, + "keepProgress":"no", + "restart":"yes", + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "./subscribe_res0.txt" + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":0, + "resubAfterConsume":-1, + "endAfterConsume":0, + "keepProgress":"no", + "restart":"yes", + "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/subResubjson/subSyncResubACMinus1endAfterNo0.json b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfterNo0.json new file mode 100644 index 0000000000..bf8927a58b --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfterNo0.json @@ -0,0 +1,41 @@ +{ + "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, + "resubAfterConsume":-1, + "endAfterConsume":1, + "keepProgress":"no", + "restart":"yes", + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "./subscribe_res0.txt" + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":1000, + "resubAfterConsume":-1, + "endAfterConsume":2, + "keepProgress":"no", + "restart":"yes", + "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 index 96612e9c94..6b2828822e 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100.json @@ -9,7 +9,7 @@ "confirm_parameter_prompt": "no", "specified_table_query": { - "concurrent":2, + "concurrent":1, "mode":"sync", "interval":0, "restart":"no", diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100Async.json b/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100Async.json new file mode 100644 index 0000000000..c45a9ea48a --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSpecMaxsql100Async.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":1, + "mode":"async", + "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/subSyncSuperMaxsql100.json b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json index a45f45231f..3214d35bf0 100644 --- a/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100.json @@ -9,18 +9,415 @@ "confirm_parameter_prompt": "no", "super_table_query": { - "stblname": "stb0", + "stblname": "stb1", "threads":4, "mode":"sync", "interval":0, - "restart":"yes", - "resubAfterConsume":0, - "keepProgress":"yes", + "restart":"no", + "resubAfterConsume":-1, + "endAfterConsume":1, + "keepProgress":"no", "sqls": [ { "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:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, { "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", "result": "./subscribe_res3.txt" diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100Async.json b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100Async.json new file mode 100644 index 0000000000..075ec9cf5d --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subSyncSuperMaxsql100Async.json @@ -0,0 +1,426 @@ +{ + "filetype":"subscribe", + "cfgdir": "/etc/taos", + "host": "127.0.0.1", + "port": 6030, + "user": "root", + "password": "taosdata", + "databases": "db", + "confirm_parameter_prompt": "no", + "super_table_query": + { + "stblname": "stb1", + "threads":4, + "mode":"async", + "interval":0, + "restart":"no", + "resubAfterConsume":-1, + "endAfterConsume":1, + "keepProgress":"no", + "sqls": [ + { + "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:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }, + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ", + "result": "./subscribe_res3.txt" + }] + } +} \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py index 526401dafa..848ddb3d4b 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py @@ -43,14 +43,14 @@ class TDTestCase: break return buildPath - # 获取订阅次数 + # get the number of subscriptions def subTimes(self,filename): self.filename = filename command = 'cat %s |wc -l'% filename times = int(subprocess.getstatusoutput(command)[1]) return times - # 检查 + # assert results def assertCheck(self,filename,subResult,expectResult): self.filename = filename self.subResult = subResult @@ -72,7 +72,7 @@ class TDTestCase: sleep(1) os.system("rm -rf ./subscribe_res*") os.system("rm -rf ./all_subscribe_res*") - + sleep(2) # subscribe: sync os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath) os.system("nohup %staosdemo -f tools/taosdemoAllTest/subSync.json &" % binPath) @@ -111,12 +111,51 @@ class TDTestCase: os.system("rm -rf ./subscribe_res*") os.system("rm -rf ./all_subscribe*") - # sql number lager 100 + # # sql number lager 100 + 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/subSyncSuperMaxsql100.json" % binPath) != 0 + + # resubAfterConsume= -1 endAfter=-1 ; + os.system('kill -9 `ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'` ') + os.system("nohup %staosdemo -f tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json & " % binPath) + sleep(2) + query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'')[1]) + print("get sub1 process'pid") + subres0Number1 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + subres2Number1 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res2* |wc -l' )[1]) + assert 0==subres0Number1 , "subres0Number1 error" + assert 0==subres2Number1 , "subres2Number1 error" + tdSql.execute("insert into db.stb00_0 values(1614218412000,'R','bf3',8637,78.861045)(1614218413000,'R','bf3',8637,98.861045)") + sleep(4) + subres2Number2 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + subres0Number2 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + assert 0!=subres2Number2 , "subres2Number2 error" + assert 0!=subres0Number2 , "subres0Number2 error" + os.system("kill -9 %d" % query_pid1) + os.system("rm -rf ./subscribe_res*") + + # # resubAfterConsume= -1 endAfter=0 ; # 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/subSyncSuperMaxsql100.json" % binPath) != 0 - # 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)") + # os.system('kill -9 `ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'` ') + # os.system("nohup %staosdemo -f tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json & " % binPath) + # sleep(2) + # query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1]) + # print("get sub2 process'pid") + # subres0Number1 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + # subres2Number1 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res2* |wc -l' )[1]) + # assert 0==subres0Number1 , "subres0Number1 error" + # assert 0==subres2Number1 , "subres2Number1 error" + # tdSql.execute("insert into db.stb00_0 values(1614218412000,'R','bf3',8637,78.861045)(1614218413000,'R','bf3',8637,98.861045)") + # sleep(4) + # subres2Number2 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + # subres0Number2 =int(subprocess.getstatusoutput('grep "1614218412000" subscribe_res0* |wc -l' )[1]) + # assert 0!=subres2Number2 , "subres2Number2 error" + # assert 0!=subres0Number2 , "subres0Number2 error" + # os.system("kill -9 %d" % query_pid1) + # os.system("rm -rf ./subscribe_res*") + + # # # merge result files diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py index 9ad9a21af8..f2aa01e870 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py @@ -106,8 +106,9 @@ class TDTestCase: os.system("kill -9 %d" % query_pid) # # query times less than or equal to 100 - # os.system("%staosdemo -f tools/taosdemoAllTest/QuerySpeciMutisql100.json" % binPath) - # os.system("%staosdemo -f tools/taosdemoAllTest/QuerySuperMutisql100.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/subSyncSuperMaxsql100.json" % binPath) != 0 # delete useless files os.system("rm -rf ./insert_res.txt") -- GitLab