Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
46905c40
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
46905c40
编写于
4月 23, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3453]<test>:modify filepath in scripts
上级
7eba44be
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
9 deletion
+16
-9
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json
...pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json
+2
-2
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
...s/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
+4
-3
tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json
tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json
+10
-4
未找到文件。
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.json
浏览文件 @
46905c40
...
@@ -35,13 +35,13 @@
...
@@ -35,13 +35,13 @@
"super_tables"
:
[{
"super_tables"
:
[{
"name"
:
"stb0"
,
"name"
:
"stb0"
,
"child_table_exists"
:
"no"
,
"child_table_exists"
:
"no"
,
"childtable_count"
:
10
0
,
"childtable_count"
:
6
0
,
"childtable_prefix"
:
"stb00_"
,
"childtable_prefix"
:
"stb00_"
,
"auto_create_table"
:
"no"
,
"auto_create_table"
:
"no"
,
"batch_create_tbl_num"
:
20
,
"batch_create_tbl_num"
:
20
,
"data_source"
:
"rand"
,
"data_source"
:
"rand"
,
"insert_mode"
:
"taosc"
,
"insert_mode"
:
"taosc"
,
"insert_rows"
:
1
5
0000
,
"insert_rows"
:
1
0
0000
,
"childtable_limit"
:
-1
,
"childtable_limit"
:
-1
,
"childtable_offset"
:
0
,
"childtable_offset"
:
0
,
"multi_thread_write_one_tbl"
:
"no"
,
"multi_thread_write_one_tbl"
:
"no"
,
...
...
tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py
浏览文件 @
46905c40
...
@@ -52,15 +52,15 @@ class TDTestCase:
...
@@ -52,15 +52,15 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
binPath
=
buildPath
+
"/build/bin/"
# # insert 1000w rows in stb0
# # insert 1000w rows in stb0
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/query-interrupt.json -y "
%
binPath
)
os
.
system
(
"%staosdemo -f tools/taosdemoAllTest/
TD-3453/
query-interrupt.json -y "
%
binPath
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
query
(
"select count (tbname) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
60
)
tdSql
.
checkData
(
0
,
0
,
60
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
query
(
"select count(*) from stb0"
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
tdSql
.
checkData
(
0
,
0
,
6000000
)
os
.
system
(
'%staosdemo -f tools/taosdemoAllTest/queryall.json -y & '
%
binPath
)
os
.
system
(
'%staosdemo -f tools/taosdemoAllTest/
TD-3453/
queryall.json -y & '
%
binPath
)
time
.
sleep
(
2
)
time
.
sleep
(
2
)
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "
taosdemoAllTest
/queryall.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
query_pid
=
int
(
subprocess
.
getstatusoutput
(
'ps aux|grep "
TD-3453
/queryall.json" |grep -v "grep"|awk
\'
{print $2}
\'
'
)[
1
])
taosd_cpu_load_1
=
float
(
subprocess
.
getstatusoutput
(
'top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk
\'
{print $2}
\'
)|awk
\'
END{print}
\'
|awk
\'
{print $9}
\'
'
)[
1
])
taosd_cpu_load_1
=
float
(
subprocess
.
getstatusoutput
(
'top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk
\'
{print $2}
\'
)|awk
\'
END{print}
\'
|awk
\'
{print $9}
\'
'
)[
1
])
if
taosd_cpu_load_1
>
10.0
:
if
taosd_cpu_load_1
>
10.0
:
os
.
system
(
"kill -9 %d"
%
query_pid
)
os
.
system
(
"kill -9 %d"
%
query_pid
)
...
@@ -78,6 +78,7 @@ class TDTestCase:
...
@@ -78,6 +78,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"%d"
%
suc_kill
)
tdSql
.
checkData
(
0
,
0
,
"%d"
%
suc_kill
)
os
.
system
(
"rm -rf querySystemInfo*"
)
os
.
system
(
"rm -rf querySystemInfo*"
)
os
.
system
(
"rm -rf insert_res.txt"
)
os
.
system
(
"rm -rf insert_res.txt"
)
os
.
system
(
"rm -rf insert_res.txt"
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/pytest/tools/taosdemoAllTest/TD-3453/queryall.json
浏览文件 @
46905c40
...
@@ -7,8 +7,14 @@
...
@@ -7,8 +7,14 @@
"password"
:
"taosdata"
,
"password"
:
"taosdata"
,
"confirm_parameter_prompt"
:
"no"
,
"confirm_parameter_prompt"
:
"no"
,
"databases"
:
"db"
,
"databases"
:
"db"
,
"specified_table_query"
:
"specified_table_query"
:{
{
"query_interval"
:
1
,
"concurrent"
:
1
,
"query_interval"
:
1
,
"sqls"
:
[{
"sql"
:
"select * from stb0"
,
"result"
:
""
}]
"concurrent"
:
1
,
}
"sqls"
:[
{
"sql"
:
"select * from stb0"
,
"result"
:
""
}
]
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录