Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
f321ba91
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f321ba91
编写于
5月 21, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add taosdemo-subscribe-testcase
上级
269547eb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
85 addition
and
54 deletion
+85
-54
tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json
tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json
+1
-1
tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json
...st/tools/taosdemoAllTest/subInsertdataMaxsql100 copy.json
+61
-0
tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json
.../pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json
+1
-1
tests/pytest/tools/taosdemoAllTest/subStb2.json
tests/pytest/tools/taosdemoAllTest/subStb2.json
+0
-24
tests/pytest/tools/taosdemoAllTest/subSync.json
tests/pytest/tools/taosdemoAllTest/subSync.json
+4
-4
tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json
tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json
+5
-13
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
...ytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
+6
-6
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
...s/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
+7
-5
未找到文件。
tests/pytest/tools/taosdemoAllTest/insertMaxNumPerReq.json
浏览文件 @
f321ba91
...
...
@@ -10,7 +10,7 @@
"result_file"
:
"./insert_res.txt"
,
"confirm_parameter_prompt"
:
"no"
,
"insert_interval"
:
0
,
"interlace_rows"
:
0
,
"interlace_rows"
:
5000
0
,
"num_of_records_per_req"
:
50000
,
"max_sql_len"
:
1025000
,
"databases"
:
[{
...
...
tests/pytest/tools/taosdemoAllTest/sub
LzInsert
.json
→
tests/pytest/tools/taosdemoAllTest/sub
InsertdataMaxsql100 copy
.json
浏览文件 @
f321ba91
{
"filetype"
:
"insert"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"
node
1"
,
"host"
:
"
127.0.0.
1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"thread_count"
:
4
,
"thread_count_create_tbl"
:
4
,
"num_of_records_per_req"
:
10000
,
"result_file"
:
"insert_stb1.txt"
,
"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"
:
"dy"
,
"drop"
:
"yes"
"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"
:
"stb
2
"
,
"child_table_exists"
:
"no"
,
"name"
:
"stb
0
"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
100
,
"childtable_prefix"
:
"
t2
_"
,
"childtable_prefix"
:
"
stb00
_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
5
00
,
"batch_create_tbl_num"
:
10
00
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_interval"
:
0
,
"insert_rows"
:
20
,
"insert_rows"
:
10
,
"childtable_limit"
:
0
,
"childtable_offset"
:
0
,
"interlace_rows"
:
0
,
"childtable_limit"
:
10000
,
"childtable_offset"
:
1
,
"max_sql_len"
:
1048576
,
"insert_interval"
:
0
,
"max_sql_len"
:
1024000
,
"disorder_ratio"
:
0
,
"disorder_range"
:
1000
,
"timestamp_step"
:
1000
,
"start_timestamp"
:
"
now
"
,
"sample_format"
:
""
,
"sample_file"
:
""
,
"start_timestamp"
:
"
2021-02-25 10:00:00.000
"
,
"sample_format"
:
"
csv
"
,
"sample_file"
:
"
./sample.csv
"
,
"tags_file"
:
""
,
"columns"
:
[{
"type"
:
"
DOUBLE"
,
"count"
:
1
},{
"type"
:
"TIMESTAMP"
,
"count"
:
1
},{
"type"
:
"SMALLINT"
,
"count"
:
2
}],
"tags"
:
[{
"type"
:
"
INT"
,
"count"
:
1
},{
"type"
:
"BINARY"
,
"len"
:
32
,
"count"
:
11
},{
"type"
:
"NCHAR"
,
"len"
:
64
,
"count"
:
4
}]
}]
"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
tests/pytest/tools/taosdemoAllTest/subInsertdataMaxsql100.json
浏览文件 @
f321ba91
...
...
@@ -35,7 +35,7 @@
"super_tables"
:
[{
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
1
5
0
,
"childtable_count"
:
1
0
0
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
1000
,
...
...
tests/pytest/tools/taosdemoAllTest/subStb2.json
已删除
100644 → 0
浏览文件 @
269547eb
{
"filetype"
:
"subscribe"
,
"cfgdir"
:
"/etc/taos"
,
"host"
:
"node1"
,
"port"
:
6030
,
"user"
:
"root"
,
"password"
:
"taosdata"
,
"databases"
:
"dy"
,
"confirm_parameter_prompt"
:
"no"
,
"specified_table_query"
:
{
"concurrent"
:
1
,
"mode"
:
"sync"
,
"interval"
:
0
,
"restart"
:
"no"
,
"keepProgress"
:
"no"
,
"sqls"
:
[
{
"sql"
:
"select * from stb2 where ts>'2021-01-01 09:35:00.000' ;"
,
"result"
:
"./sub_stb2.txt"
}]
}
}
\ No newline at end of file
tests/pytest/tools/taosdemoAllTest/subSync.json
浏览文件 @
f321ba91
...
...
@@ -12,8 +12,8 @@
"concurrent"
:
2
,
"mode"
:
"sync"
,
"interval"
:
0
,
"restart"
:
"
yes
"
,
"keepProgress"
:
"
yes
"
,
"restart"
:
"
no
"
,
"keepProgress"
:
"
no
"
,
"sqls"
:
[
{
"sql"
:
"select * from stb00_0"
,
...
...
@@ -30,8 +30,8 @@
"threads"
:
2
,
"mode"
:
"sync"
,
"interval"
:
10000
,
"restart"
:
"
yes
"
,
"keepProgress"
:
"
yes
"
,
"restart"
:
"
no
"
,
"keepProgress"
:
"
no
"
,
"sqls"
:
[
{
"sql"
:
"select * from xxxx where ts >= '2021-02-25 10:00:01.000' "
,
...
...
tests/pytest/tools/taosdemoAllTest/subSyncKeepStart.json
浏览文件 @
f321ba91
...
...
@@ -12,17 +12,13 @@
"concurrent"
:
2
,
"mode"
:
"sync"
,
"interval"
:
0
,
"restartAfterConsume"
:
0
,
"restart"
:
"
yes
"
,
"restartAfterConsume"
:
1
,
"restart"
:
"
no
"
,
"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"
:
...
...
@@ -31,17 +27,13 @@
"threads"
:
2
,
"mode"
:
"sync"
,
"interval"
:
10000
,
"restartAfterConsume"
:
0
,
"restart"
:
"
yes
"
,
"keepProgress"
:
"
yes
"
,
"restartAfterConsume"
:
1
,
"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
tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
浏览文件 @
f321ba91
...
...
@@ -221,12 +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 stb0
"
)
tdSql
.
checkData
(
0
,
0
,
5000000
)
#
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)
...
...
tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py
浏览文件 @
f321ba91
...
...
@@ -68,11 +68,12 @@ class TDTestCase:
# 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*"
)
# # subscribe:
a
sync
# # 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])
...
...
@@ -105,7 +106,6 @@ class TDTestCase:
# # correct data testcase
# os.system("kill -9 %d" % query_pid)
# sleep(3)
# os.system("rm -rf ./subscribe_res*")
...
...
@@ -114,7 +114,10 @@ class TDTestCase:
# sql number lager 100
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json"
%
binPath
)
# assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) !=0
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json"
%
binPath
)
# os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/subSyncKeepStart.json"
%
binPath
)
tdSql
.
execute
(
"insert into db.stb00_1 values(1614218412000,'R','bf3',8637,78.861045)(1614218413000,'R','bf3',8637,98.861045)"
)
# # # merge result files
# os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt")
...
...
@@ -138,8 +141,7 @@ class TDTestCase:
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/subLzInsert.json" % binPath)
# os.system("%staosdemo -f tools/taosdemoAllTest/subStb2.json" % binPath)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录