[TD-4369]<test>: add testcase of resubscibe and json file
This commit is contained in:
parent
84d3a5e77b
commit
bcfb8b1fe1
|
@ -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": ""
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
|
@ -116,9 +116,17 @@ class TDTestCase:
|
||||||
assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0
|
assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0
|
||||||
assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.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 ;
|
# resubAfterConsume= -1 endAfter=-1 ;
|
||||||
os.system('kill -9 `ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'` ')
|
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)
|
sleep(2)
|
||||||
query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
||||||
print("get sub1 process'pid")
|
print("get sub1 process'pid")
|
||||||
|
@ -138,7 +146,7 @@ class TDTestCase:
|
||||||
# # resubAfterConsume= -1 endAfter=0 ;
|
# # resubAfterConsume= -1 endAfter=0 ;
|
||||||
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
|
# 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('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)
|
# sleep(2)
|
||||||
# query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
# query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1])
|
||||||
# print("get sub2 process'pid")
|
# print("get sub2 process'pid")
|
||||||
|
|
Loading…
Reference in New Issue