未验证 提交 1ebc34f7 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #6631 from taosdata/test/chr

[TD-3414]<test>: update taosdemo testcase of query and sub
......@@ -9,29 +9,33 @@
"confirm_parameter_prompt": "no",
"specified_table_query":
{
"concurrent":1,
"concurrent":2,
"mode":"sync",
"interval":0,
"restart":"yes",
"resubAfterConsume":1,
"endAfterConsume":1,
"keepProgress":"yes",
"restart":"no",
"sqls": [
{
"sql": "select * from stb00_0 ;",
"sql": "select * from stb00_0",
"result": "./subscribe_res0.txt"
}]
},
"super_table_query":
{
"stblname": "stb0",
"threads":1,
"threads":2,
"mode":"sync",
"interval":10000,
"restart":"yes",
"interval":1000,
"resubAfterConsume":1,
"endAfterConsume":1,
"keepProgress":"yes",
"restart":"no",
"sqls": [
{
"sql": "select * from xxxx where ts > '2021-02-25 11:35:00.000' ;",
"result": "./subscribe_res1.txt"
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
}]
}
}
\ No newline at end of file
{
"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
{
"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
{
"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
{
"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
......@@ -78,7 +78,7 @@ class TDTestCase:
tdSql.checkData(0, 0, "%d" % suc_kill)
os.system("rm -rf querySystemInfo*")
os.system("rm -rf insert_res.txt")
os.system("rm -rf insert_res.txt")
os.system("rm -rf query_res.txt")
def stop(self):
tdSql.close()
......
......@@ -13,7 +13,7 @@
"sqls":[
{
"sql": "select * from stb0",
"result": ""
"result": "./query_res.txt"
}
]
}
......
......@@ -2,6 +2,14 @@ from datetime import datetime
import time
import os
# class FileSeparaSpaceConvertcomma:
# def __init__(self):
# self.inputfile = ""
# self.oputfile = ""
# self.affectedRows = 0
# def ConvertFile(self, inputfile,):
os.system("awk -v OFS=',' '{$1=$1;print$0}' ./all_query_res0.txt > ./new_query_res0.txt")
with open('./new_query_res0.txt','r+') as f0:
contents = f0.readlines()
......
......@@ -8,7 +8,7 @@
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file":"./insert_res.txt",
"confirm_parameter_prompt": "no",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 1000,
......
......@@ -71,7 +71,7 @@
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 1000000,
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
......@@ -97,7 +97,7 @@
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 1000000,
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
......@@ -123,7 +123,7 @@
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 1000000,
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 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": 1000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"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": 10,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1000,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 1000,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1004}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}]
}]
}]
}
{
"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": 50000,
"num_of_records_per_req": 50000,
"max_sql_len": 1025000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"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": 100,
"childtable_prefix": "stb00_",
"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": 0,
"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}]
},
{
"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}]
}]
}]
}
{
"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": 100,
"num_of_records_per_req": 100,
"max_sql_len": 1024000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"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": 10,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "rest",
"insert_rows": 10,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 10,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 20,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}]
}]
}]
}
......@@ -11,8 +11,8 @@
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 100,
"max_sql_len": 10240000000,
"num_of_records_per_req": 1000000,
"max_sql_len": 1024000000,
"databases": [{
"dbinfo": {
"name": "db1",
......@@ -45,7 +45,7 @@
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"interlace_rows": 10000,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
......
......@@ -60,7 +60,7 @@ class TDTestCase:
tdSql.checkData(0, 0, 1000000)
os.system("rm -rf ./insert_res.txt")
os.system("rm -rf tools/taosdemoAllTest/taosdemoTestWithJson-1.py.sql")
os.system("rm -rf tools/taosdemoAllTest/moredemo-insert-offset.py.sql")
def stop(self):
......
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times":3,
"specified_table_query": {
"query_interval": 0,
"concurrent": 1,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 0,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times":3,
"specified_table_query": {
"query_interval": 0,
"concurrent": 1,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": -1,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times":3,
"specified_table_query": {
"query_interval": 0,
"concurrent": 0,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 1,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times":3,
"specified_table_query": {
"query_interval": 0,
"concurrent": -1,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 1,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
......@@ -35,7 +35,7 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_count": 10,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
......@@ -54,13 +54,13 @@
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}, {"type": "INT"}, {"type": "DOUBLE", "count":1}],
"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": 100,
"childtable_count": 10,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
......@@ -79,7 +79,7 @@
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 1, "count":3}, {"type": "BINARY", "len": 2, "count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
......
{
"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": 2,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"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": 1,
"start_timestamp": "2020-11-01 00: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}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 2,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 5,
"childtable_limit": 0,
"childtable_offset": 0,
"interlace_rows": 0 ,
"insert_interval": 0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-11-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":6}, {"type": "BINARY", "len": 1, "count":3}, {"type": "BINARY", "len": 2, "count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
......@@ -9,8 +9,8 @@
"databases": "db",
"query_times": 1,
"specified_table_query": {
"query_interval": 0,
"concurrent": 1,
"query_interval": 10000,
"concurrent": 4,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
......@@ -24,8 +24,8 @@
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 1,
"query_interval":20000,
"threads": 4,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
......
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times": 0,
"specified_table_query": {
"query_interval": 0,
"concurrent": 1,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 1,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times": -1,
"specified_table_query": {
"query_interval": 0,
"concurrent": 1,
"sqls": [
{
"sql": "select last_row(*) from stb00_0",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb00_99 ",
"result": "./query_res1.txt"
}]
},
"super_table_query": {
"stblname": "stb1",
"query_interval":0,
"threads": 1,
"sqls": [
{
"sql": "select last_row(ts) from xxxx",
"result": "./query_res2.txt"
}
]
}
}
\ No newline at end of file
{
"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":"async",
"interval":0,
"restart":"yes",
"keepProgress":"yes",
"sqls": [
{
"sql": "select * from stb00_0",
"result": "./subscribe_res0.txt"
},
{
"sql": "select ts from stb00_1",
"result": "./subscribe_res1.txt"
}]
},
"super_table_query":
{
"stblname": "stb0",
"threads":2,
"mode":"async",
"interval":0,
"restart":"yes",
"keepProgress":"yes",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
},
{
"sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ",
"result": "./subscribe_res3.txt"
}]
}
}
\ No newline at end of file
......@@ -35,26 +35,26 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_count": 2,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"insert_rows": 10,
"childtable_limit": 0,
"childtable_offset": 0,
"interlace_rows": 0,
"insert_interval": 0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 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":50, "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "INT"}, {"type": "DOUBLE", "count":1}],
"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}]
}]
}]
......
{
"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}]
},
{
"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
{
"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_res0.txt"
},
{
"sql": "select ts from stb00_1",
"result": "./subscribe_res1.txt"
}]
},
"super_table_query":
{
"stblname": "stb0",
"threads":2,
"mode":"sync",
"interval":10000,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
},
{
"sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ",
"result": "./subscribe_res3.txt"
}]
}
}
\ No newline at end of file
{
"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
{
"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":"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
{
"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
{
"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":"sync",
"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
{
"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
......@@ -64,6 +64,22 @@ class TDTestCase:
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000)
# restful connector insert data
os.system("%staosdemo -f tools/taosdemoAllTest/insertRestful.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200)
# insert: create mutiple tables per sql and insert one rows per sql .
os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tntmr.json -y " % binPath)
......@@ -165,6 +181,10 @@ class TDTestCase:
tdSql.query("select count(*) from db.stb0")
tdSql.checkData(0, 0, 10000)
tdSql.execute("drop database if exists db")
os.system("%staosdemo -f tools/taosdemoAllTest/insertInterlaceRowsLarge1M.json -y " % binPath)
tdSql.query("select count(*) from db.stb0")
tdSql.checkRows(0)
tdSql.execute("drop database if exists db")
os.system("%staosdemo -f tools/taosdemoAllTest/insertColumnsNum0.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("show stables like 'stb0%' ")
......@@ -201,6 +221,12 @@ class TDTestCase:
tdSql.checkData(0, 0, "2019-10-01 00:00:00")
tdSql.query("select last(ts) from blf.p_0_topics_6 ")
tdSql.checkData(0, 0, "2020-09-29 23:59:00")
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 stb1")
tdSql.checkData(0, 0, 5000000)
......
......@@ -19,6 +19,9 @@ from util.sql import *
from util.dnodes import *
import time
from datetime import datetime
import ast
# from assertpy import assert_that
import subprocess
class TDTestCase:
def init(self, conn, logSql):
......@@ -40,85 +43,145 @@ class TDTestCase:
buildPath = root[:len(root)-len("/build/bin")]
break
return buildPath
# 获取taosc接口查询的结果文件中的内容,返回每行数据,并断言数据的第一列内容。
def assertfileDataTaosc(self,filename,expectResult):
self.filename = filename
self.expectResult = expectResult
with open("%s" % filename, 'r+') as f1:
for line in f1.readlines():
queryResult = line.strip().split()[0]
self.assertCheck(filename,queryResult,expectResult)
# 获取restful接口查询的结果文件中的关键内容,目前的关键内容找到第一个key就跳出循,所以就只有一个数据。后续再修改多个结果文件。
def getfileDataRestful(self,filename):
self.filename = filename
with open("%s" % filename, 'r+') as f1:
for line in f1.readlines():
contents = line.strip()
if contents.find("data") != -1:
contentsDict = ast.literal_eval(contents) # 字符串转换为字典
queryResult = contentsDict['data'][0][0]
break
return queryResult
# 获取taosc接口查询次数
def queryTimesTaosc(self,filename):
self.filename = filename
command = 'cat %s |wc -l'% filename
times = int(subprocess.getstatusoutput(command)[1])
return times
# 获取restful接口查询次数
def queryTimesRestful(self,filename):
self.filename = filename
command = 'cat %s |grep "200 OK" |wc -l'% filename
times = int(subprocess.getstatusoutput(command)[1])
return times
# 定义断言结果是否正确。不正确返回错误结果,正确即通过。
def assertCheck(self,filename,queryResult,expectResult):
self.filename = filename
self.queryResult = queryResult
self.expectResult = expectResult
args0 = (filename, queryResult, expectResult)
assert queryResult == expectResult , "Queryfile:%s ,result is %s != expect: %s" % args0
def run(self):
buildPath = self.getBuildPath()
if (buildPath == ""):
tdLog.exit("taosd not found!")
else:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
binPath = buildPath+ "/build/bin/"
# delete useless files
os.system("rm -rf ./query_res*")
os.system("rm -rf ./all_query*")
# taosc query: query specified table and query super table
os.system("%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/queryTaosc.json" % binPath)
os.system("cat query_res0.txt* > all_query_res0_taosc.txt")
os.system("cat query_res1.txt* > all_query_res1_taosc.txt")
os.system("cat query_res2.txt* > all_query_res2_taosc.txt")
# correct Times testcases
queryTimes0Taosc = self.queryTimesTaosc("all_query_res0_taosc.txt")
self.assertCheck("all_query_res0_taosc.txt",queryTimes0Taosc,6)
queryTimes1Taosc = self.queryTimesTaosc("all_query_res1_taosc.txt")
self.assertCheck("all_query_res1_taosc.txt",queryTimes1Taosc,6)
queryTimes2Taosc = self.queryTimesTaosc("all_query_res2_taosc.txt")
self.assertCheck("all_query_res2_taosc.txt",queryTimes2Taosc,20)
# correct data testcase
self.assertfileDataTaosc("all_query_res0_taosc.txt","1604160000099")
self.assertfileDataTaosc("all_query_res1_taosc.txt","100")
self.assertfileDataTaosc("all_query_res2_taosc.txt","1604160000199")
# query: query specified table and query super table
os.system("%staosdemo -f tools/taosdemoAllTest/speciQueryInsertdata.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/speciQueryTaosc.json" % binPath)
os.system("cat query_res0.txt* |sort -u > all_query_res0.txt")
os.system("cat query_res1.txt* |sort -u > all_query_res1.txt")
os.system("cat query_res2.txt* |sort -u > all_query_res2.txt")
tdSql.execute("use db")
tdSql.execute('create table result0 using stb0 tags(121,43,"beijing","beijing","beijing","beijing","beijing")')
os.system("python3 tools/taosdemoAllTest/convertResFile.py")
tdSql.execute("insert into result0 file './test_query_res0.txt'")
tdSql.query("select ts from result0")
tdSql.checkData(0, 0, "2020-11-01 00:00:00.099000")
tdSql.query("select count(*) from result0")
tdSql.checkData(0, 0, 1)
with open('./all_query_res1.txt','r+') as f1:
result1 = int(f1.readline())
tdSql.query("select count(*) from stb00_1")
tdSql.checkData(0, 0, "%d" % result1)
with open('./all_query_res2.txt','r+') as f2:
result2 = int(f2.readline())
d2 = datetime.fromtimestamp(result2/1000)
timest = d2.strftime("%Y-%m-%d %H:%M:%S.%f")
tdSql.query("select last_row(ts) from stb1")
tdSql.checkData(0, 0, "%s" % timest)
# delete useless files
os.system("rm -rf ./query_res*")
os.system("rm -rf ./all_query*")
# use restful api to query
os.system("%staosdemo -f tools/taosdemoAllTest/queryInsertrestdata.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/queryRestful.json" % binPath)
os.system("cat query_res0.txt* > all_query_res0_rest.txt")
os.system("cat query_res1.txt* > all_query_res1_rest.txt")
os.system("cat query_res2.txt* > all_query_res2_rest.txt")
# # delete useless files
# os.system("rm -rf ./insert_res.txt")
# os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
# os.system("rm -rf ./querySystemInfo*")
# os.system("rm -rf ./query_res*")
# os.system("rm -rf ./all_query*")
# os.system("rm -rf ./test_query_res0.txt")
# # use restful api to query
# os.system("%staosdemo -f tools/taosdemoAllTest/speciQueryInsertdata.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/speciQueryRestful.json" % binPath)
# os.system("cat query_res0.txt* |sort -u > all_query_res0.txt")
# os.system("cat query_res1.txt* |sort -u > all_query_res1.txt")
# # os.system("cat query_res2.txt* |sort -u > all_query_res2.txt")
# tdSql.execute("use db")
# tdSql.execute('create table result0 using stb0 tags(121,43,"beijing","beijing","beijing","beijing","beijing")')
# os.system("python3 tools/taosdemoAllTest/convertResFile.py")
# tdSql.execute("insert into result0 file './test_query_res0.txt'")
# tdSql.query("select ts from result0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.099000")
# tdSql.query("select count(*) from result0")
# tdSql.checkData(0, 0, 1)
# with open('./all_query_res1.txt','r+') as f1:
# result1 = int(f1.readline())
# tdSql.query("select count(*) from stb00_1")
# tdSql.checkData(0, 0, "%d" % result1)
# with open('./all_query_res2.txt','r+') as f2:
# result2 = int(f2.readline())
# d2 = datetime.fromtimestamp(result2/1000)
# timest = d2.strftime("%Y-%m-%d %H:%M:%S.%f")
# tdSql.query("select last_row(ts) from stb1")
# tdSql.checkData(0, 0, "%s" % timest)
# correct Times testcases
queryTimes0Restful = self.queryTimesRestful("all_query_res0_rest.txt")
self.assertCheck("all_query_res0_rest.txt",queryTimes0Restful,6)
queryTimes1Restful = self.queryTimesRestful("all_query_res1_rest.txt")
self.assertCheck("all_query_res1_rest.txt",queryTimes1Restful,6)
queryTimes2Restful = self.queryTimesRestful("all_query_res2_rest.txt")
self.assertCheck("all_query_res2_rest.txt",queryTimes2Restful,4)
# correct data testcase
data0 = self.getfileDataRestful("all_query_res0_rest.txt")
self.assertCheck('all_query_res0_rest.txt',data0,"2020-11-01 00:00:00.009")
data1 = self.getfileDataRestful("all_query_res1_rest.txt")
self.assertCheck('all_query_res1_rest.txt',data1,10)
data2 = self.getfileDataRestful("all_query_res2_rest.txt")
self.assertCheck('all_query_res2_rest.txt',data2,"2020-11-01 00:00:00.004")
# query times less than or equal to 100
os.system("%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/querySpeciMutisql100.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/querySuperMutisql100.json" % binPath)
# query result print QPS
#query result print QPS
os.system("%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/queryQps.json" % binPath)
# use illegal or out of range parameters query json file
os.system("%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % binPath)
exceptcode = os.system("%staosdemo -f tools/taosdemoAllTest/queryTimes0.json" % binPath)
assert exceptcode != 0
exceptcode0 = os.system("%staosdemo -f tools/taosdemoAllTest/queryTimesless0.json" % binPath)
assert exceptcode0 != 0
exceptcode1 = os.system("%staosdemo -f tools/taosdemoAllTest/queryConcurrentless0.json" % binPath)
assert exceptcode1 != 0
exceptcode2 = os.system("%staosdemo -f tools/taosdemoAllTest/queryConcurrent0.json" % binPath)
assert exceptcode2 != 0
exceptcode3 = os.system("%staosdemo -f tools/taosdemoAllTest/querrThreadsless0.json" % binPath)
assert exceptcode3 != 0
exceptcode4 = os.system("%staosdemo -f tools/taosdemoAllTest/querrThreads0.json" % binPath)
assert exceptcode4 != 0
# delete useless files
os.system("rm -rf ./insert_res.txt")
......@@ -127,6 +190,8 @@ class TDTestCase:
os.system("rm -rf ./query_res*")
os.system("rm -rf ./all_query*")
os.system("rm -rf ./test_query_res0.txt")
def stop(self):
tdSql.close()
......
......@@ -19,6 +19,8 @@ from util.sql import *
from util.dnodes import *
import time
from datetime import datetime
import subprocess
class TDTestCase:
def init(self, conn, logSql):
......@@ -40,7 +42,22 @@ class TDTestCase:
buildPath = root[:len(root)-len("/build/bin")]
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
self.expectResult = expectResult
args0 = (filename, subResult, expectResult)
assert subResult == expectResult , "Queryfile:%s ,result is %s != expect: %s" % args0
def run(self):
buildPath = self.getBuildPath()
if (buildPath == ""):
......@@ -48,48 +65,136 @@ class TDTestCase:
else:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
# clear env
os.system("ps -ef |grep 'taosdemoAllTest/subSync.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
os.system("ps -ef |grep 'taosdemoAllTest/subSyncKeepStart.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
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)
query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk \'{print $2}\'')[1])
# insert extral data
tdSql.execute("use db")
tdSql.execute("insert into stb00_0 values(1614218412000,'R','bf3',8637,98.861045)")
tdSql.execute("insert into stb00_1 values(1614218412000,'R','bf3',8637,78.861045)(1614218422000,'R','bf3',8637,98.861045)")
sleep(5)
# 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")
# query: query specified table and query super table
# os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/sub.json" % binPath)
# os.system("cat query_res0.txt* |sort -u > all_query_res0.txt")
# os.system("cat query_res1.txt* |sort -u > all_query_res1.txt")
# os.system("cat query_res2.txt* |sort -u > all_query_res2.txt")
# tdSql.execute("use db")
# tdSql.execute('create table result0 using stb0 tags(121,43,"beijing","beijing","beijing","beijing","beijing")')
# os.system("python3 tools/taosdemoAllTest/convertResFile.py")
# tdSql.execute("insert into result0 file './test_query_res0.txt'")
# tdSql.query("select ts from result0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.099000")
# tdSql.query("select count(*) from result0")
# tdSql.checkData(0, 0, 1)
# with open('./all_query_res1.txt','r+') as f1:
# result1 = int(f1.readline())
# tdSql.query("select count(*) from stb00_1")
# tdSql.checkData(0, 0, "%d" % result1)
# with open('./all_query_res2.txt','r+') as f2:
# result2 = int(f2.readline())
# d2 = datetime.fromtimestamp(result2/1000)
# timest = d2.strftime("%Y-%m-%d %H:%M:%S.%f")
# tdSql.query("select last_row(ts) from stb1")
# tdSql.checkData(0, 0, "%s" % timest)
# correct subscribeTimes testcase
subTimes0 = self.subTimes("all_subscribe_res0.txt")
self.assertCheck("all_subscribe_res0.txt",subTimes0 ,22)
subTimes1 = self.subTimes("all_subscribe_res1.txt")
self.assertCheck("all_subscribe_res1.txt",subTimes1 ,24)
subTimes2 = self.subTimes("all_subscribe_res2.txt")
self.assertCheck("all_subscribe_res2.txt",subTimes2 ,21)
subTimes3 = self.subTimes("all_subscribe_res3.txt")
self.assertCheck("all_subscribe_res3.txt",subTimes3 ,13)
# # 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)
# correct data testcase
os.system("kill -9 %d" % query_pid)
sleep(3)
os.system("rm -rf ./subscribe_res*")
os.system("rm -rf ./all_subscribe*")
# # 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
# # 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/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")
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)
# os.system('kill -9 `ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'` ')
# 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")
# 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
# 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)
# delete useless files
# os.system("rm -rf ./insert_res.txt")
# os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
# os.system("rm -rf ./querySystemInfo*")
# os.system("rm -rf ./query_res*")
# os.system("rm -rf ./all_query*")
# os.system("rm -rf ./test_query_res0.txt")
os.system("rm -rf ./insert_res.txt")
os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
os.system("rm -rf ./subscribe_res*")
os.system("rm -rf ./all_subscribe*")
def stop(self):
tdSql.close()
......
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import sys
import os
from util.log import *
from util.cases import *
from util.sql import *
from util.dnodes import *
import time
from datetime import datetime
import subprocess
class TDTestCase:
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
def getBuildPath(self):
selfPath = os.path.dirname(os.path.realpath(__file__))
if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")]
else:
projPath = selfPath[:selfPath.find("tests")]
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
break
return buildPath
# 获取订阅次数
def subTimes(self,filename):
self.filename = filename
command = 'cat %s |wc -l'% filename
times = int(subprocess.getstatusoutput(command)[1])
return times
def assertCheck(self,filename,queryResult,expectResult):
self.filename = filename
self.queryResult = queryResult
self.expectResult = expectResult
args0 = (filename, queryResult, expectResult)
assert queryResult == expectResult , "Queryfile:%s ,result is %s != expect: %s" % args0
def run(self):
buildPath = self.getBuildPath()
if (buildPath == ""):
tdLog.exit("taosd not found!")
else:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
# clear env
os.system("ps -ef |grep 'taosdemoAllTest/subAsync.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9")
sleep(1)
os.system("rm -rf ./subscribe_res*")
os.system("rm -rf ./all_subscribe_res*")
# subscribe: resultfile
os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath)
os.system("nohup %staosdemo -f tools/taosdemoAllTest/subAsync.json &" % binPath)
query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subAsync.json" |grep -v "grep"|awk \'{print $2}\'')[1])
# insert extral data
tdSql.execute("use db")
tdSql.execute("insert into stb00_0 values(1614218412000,'R','bf3',8637,98.861045)")
tdSql.execute("insert into stb00_1 values(1614218412000,'R','bf3',8637,78.861045)(1614218422000,'R','bf3',8637,98.861045)")
sleep(5)
# 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")
# correct subscribeTimes testcase
subTimes0 = self.subTimes("all_subscribe_res0.txt")
self.assertCheck("all_subscribe_res0.txt",subTimes0 ,22)
subTimes1 = self.subTimes("all_subscribe_res1.txt")
self.assertCheck("all_subscribe_res1.txt",subTimes1 ,24)
subTimes2 = self.subTimes("all_subscribe_res2.txt")
self.assertCheck("all_subscribe_res2.txt",subTimes2 ,21)
subTimes3 = self.subTimes("all_subscribe_res3.txt")
self.assertCheck("all_subscribe_res3.txt",subTimes3 ,13)
# correct data testcase
os.system("kill -9 %d" % query_pid)
# # query times less than or equal to 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
# delete useless files
os.system("rm -rf ./insert_res.txt")
os.system("rm -rf tools/taosdemoAllTest/*.py.sql")
os.system("rm -rf ./subscribe_res*")
os.system("rm -rf ./all_subscribe*")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
......@@ -27,10 +27,18 @@ class TDTestCase:
self.ts = 1538548685000
self.numberOfTables = 10000
self.numberOfRecords = 100
def run(self):
tdSql.prepare()
def run(self):
if not os.path.exists("/taosdumptest/tmp1"):
os.makedirs("/taosdumptest/tmp1")
else:
print("目录存在")
if not os.path.exists("/taosdumptest/tmp2"):
os.makedirs("/taosdumptest/tmp2")
tdSql.execute("drop database if exists db")
tdSql.execute("create database db days 11 keep 3649 blocks 8 ")
tdSql.execute("create database db1 days 12 keep 3640 blocks 7 ")
tdSql.execute("use db")
tdSql.execute("create table st(ts timestamp, c1 int, c2 nchar(10)) tags(t1 int, t2 binary(10))")
tdSql.execute("create table t1 using st tags(1, 'beijing')")
sql = "insert into t1 values"
......@@ -38,27 +46,41 @@ class TDTestCase:
for i in range(100):
sql += "(%d, %d, 'nchar%d')" % (currts + i, i % 100, i % 100)
tdSql.execute(sql)
tdSql.execute("create table t2 using st tags(2, 'shanghai')")
sql = "insert into t2 values"
currts = self.ts
for i in range(100):
sql += "(%d, %d, 'nchar%d')" % (currts + i, i % 100, i % 100)
tdSql.execute(sql)
os.system("taosdump --databases db -o /tmp")
tdSql.execute(sql)
os.system("taosdump --databases db -o /taosdumptest/tmp1")
os.system("taosdump --databases db1 -N -o /taosdumptest/tmp2")
tdSql.execute("drop database db")
tdSql.execute("drop database db1")
tdSql.query("show databases")
tdSql.checkRows(0)
os.system("taosdump -i /tmp")
os.system("taosdump -i /taosdumptest/tmp1")
os.system("taosdump -i /taosdumptest/tmp2")
tdSql.query("show databases")
tdSql.checkRows(1)
tdSql.checkData(0, 0, 'db')
tdSql.execute("use db")
tdSql.query("show databases")
tdSql.checkRows(2)
dbresult = tdSql.queryResult
# 6--days,7--keep0,keep1,keep, 12--block,
for i in range(len(dbresult)):
if dbresult[i][0] == 'db':
print(dbresult[i])
print(type(dbresult[i][6]))
print(type(dbresult[i][7]))
print(type(dbresult[i][9]))
assert dbresult[i][6] == 11
assert dbresult[i][7] == "3649,3649,3649"
assert dbresult[i][9] == 8
if dbresult[i][0] == 'db1':
assert dbresult[i][6] == 10
assert dbresult[i][7] == "3650,3650,3650"
assert dbresult[i][9] == 6
tdSql.query("show stables")
tdSql.checkRows(1)
tdSql.checkData(0, 0, 'st')
......@@ -80,6 +102,36 @@ class TDTestCase:
tdSql.checkData(i, 1, i)
tdSql.checkData(i, 2, "nchar%d" % i)
# drop all databases,boundary value testing. length(databasename)<=32;length(tablesname)<=192
tdSql.execute("drop database db")
tdSql.execute("drop database db1")
os.system("rm -rf /taosdumptest/tmp1")
os.system("rm -rf /taosdumptest/tmp2")
os.makedirs("/taosdumptest/tmp1")
tdSql.execute("create database db12312313231231321312312312_323")
tdSql.error("create database db12312313231231321312312312_3231")
tdSql.execute("use db12312313231231321312312312_323")
tdSql.execute("create stable st12345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678_9(ts timestamp, c1 int, c2 nchar(10)) tags(t1 int, t2 binary(10))")
tdSql.error("create stable st_12345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678_9(ts timestamp, c1 int, c2 nchar(10)) tags(t1 int, t2 binary(10))")
tdSql.execute("create stable st(ts timestamp, c1 int, c2 nchar(10)) tags(t1 int, t2 binary(10))")
tdSql.error("create stable st1(ts timestamp, c1 int, col2_012345678901234567890123456789012345678901234567890123456789 nchar(10)) tags(t1 int, t2 binary(10))")
tdSql.execute("select * from db12312313231231321312312312_323.st12345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678_9")
tdSql.error("create table t0_12345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678_9 using st tags(1, 'beijing')")
tdSql.query("show stables")
tdSql.checkRows(2)
os.system("taosdump --databases db12312313231231321312312312_323 -o /taosdumptest/tmp1")
tdSql.execute("drop database db12312313231231321312312312_323")
os.system("taosdump -i /taosdumptest/tmp1")
tdSql.execute("use db12312313231231321312312312_323")
tdSql.query("show stables")
tdSql.checkRows(2)
os.system("rm -rf /taosdumptest/tmp1")
os.system("rm -rf /taosdumptest/tmp2")
os.system("rm -rf ./dump_result.txt")
os.system("rm -rf ./db.csv")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册