diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfter1.json b/tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubAC1endAfter1.json similarity index 100% rename from tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfter1.json rename to tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubAC1endAfter1.json diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json b/tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubAC1endAfterMin1.json similarity index 100% rename from tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubAC1endAfterMin1.json rename to tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubAC1endAfterMin1.json diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json b/tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json similarity index 100% rename from tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1.json rename to tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json b/tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json similarity index 100% rename from tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfter0.json rename to tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json diff --git a/tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfterNo0.json b/tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfterNo0.json similarity index 100% rename from tests/pytest/tools/taosdemoAllTest/subResubjson/subSyncResubACMinus1endAfterNo0.json rename to tests/pytest/tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfterNo0.json diff --git a/tests/pytest/tools/taosdemoAllTest/subSyncResFileNull.json b/tests/pytest/tools/taosdemoAllTest/subSyncResFileNull.json new file mode 100644 index 0000000000000000000000000000000000000000..625e4792cfa113166e0ba5b0ef068bb2109bf027 --- /dev/null +++ b/tests/pytest/tools/taosdemoAllTest/subSyncResFileNull.json @@ -0,0 +1,49 @@ +{ + "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", + "resubAfterConsume":-1, + "endAfterConsume":1, + "sqls": [ + { + "sql": "select * from stb00_0", + "result": "" + }, + { + "sql": "select ts from stb00_1", + "result": "" + }] + }, + "super_table_query": + { + "stblname": "stb0", + "threads":2, + "mode":"sync", + "interval":10000, + "restart":"no", + "keepProgress":"no", + "resubAfterConsume":-1, + "endAfterConsume":1, + "sqls": [ + { + "sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ", + "result": "" + }, + { + "sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ", + "result": "" + }] + } + } \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py index 848ddb3d4bde5122bf209bda8e7b8529062f8530..3e967581a4491da4108b981ccd83949751406b82 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py @@ -116,9 +116,17 @@ class TDTestCase: assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0 assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) != 0 + # # result files is null + # os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) + # os.system("%staosdemo -f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) + # # assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncResFileNull.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) + os.system("nohup %staosdemo -f tools/taosdemoAllTest/Resubjson/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") @@ -138,7 +146,7 @@ class TDTestCase: # # resubAfterConsume= -1 endAfter=0 ; # os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) # 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) + # os.system("nohup %staosdemo -f tools/taosdemoAllTest/Resubjson/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")