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

[TD-4369]<test>: add testcase of resubscibe and json file

上级 84d3a5e7
{
"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
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册