Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
d5b1978e
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d5b1978e
编写于
7月 03, 2020
作者:
sangshuduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix importDataLastSub.py failed with valgrind.
[TD-827]
上级
8a24b899
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
30 addition
and
9 deletion
+30
-9
tests/pytest/import_merge/importDataLastSub.py
tests/pytest/import_merge/importDataLastSub.py
+2
-0
tests/pytest/test.py
tests/pytest/test.py
+12
-3
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+16
-6
未找到文件。
tests/pytest/import_merge/importDataLastSub.py
浏览文件 @
d5b1978e
...
...
@@ -32,6 +32,7 @@ class TDTestCase:
tdDnodes
.
stop
(
1
)
tdDnodes
.
deploy
(
1
)
tdDnodes
.
start
(
1
)
tdLog
.
sleep
(
5
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
...
...
@@ -61,6 +62,7 @@ class TDTestCase:
tdDnodes
.
stop
(
1
)
tdLog
.
sleep
(
5
)
tdDnodes
.
start
(
1
)
tdLog
.
sleep
(
5
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
...
...
tests/pytest/test.py
浏览文件 @
d5b1978e
...
...
@@ -81,7 +81,7 @@ if __name__ == "__main__":
else
:
toBeKilled
=
"valgrind.bin"
killCmd
=
"ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -HUP "
%
toBeKilled
killCmd
=
"ps -ef|grep -w %s| grep -v grep | awk '{print $2}' | xargs kill -HUP
> /dev/null 2>&1
"
%
toBeKilled
psCmd
=
"ps -ef|grep -w %s| grep -v grep | awk '{print $2}'"
%
toBeKilled
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
...
...
@@ -91,8 +91,17 @@ if __name__ == "__main__":
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
fuserCmd
=
"fuser -k -n tcp 6030"
for
port
in
range
(
6030
,
6041
):
usePortPID
=
"lsof -i tcp:%d | grep LISTEn | awk '{print $2}'"
%
port
processID
=
subprocess
.
check_output
(
usePortPID
,
shell
=
True
)
if
processID
:
killCmd
=
"kill -9 %s"
%
processID
os
.
system
(
killCmd
)
fuserCmd
=
"fuser -k -n tcp %d"
%
port
os
.
system
(
fuserCmd
)
if
valgrind
:
time
.
sleep
(
2
)
tdLog
.
info
(
'stop All dnodes'
)
sys
.
exit
(
0
)
...
...
tests/pytest/util/dnodes.py
浏览文件 @
d5b1978e
...
...
@@ -251,11 +251,16 @@ class TDDnode:
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -INT %s"
%
processID
killCmd
=
"kill -INT %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
for
port
in
range
(
6030
,
6041
):
fuserCmd
=
"fuser -k -n tcp %d"
%
port
os
.
system
(
fuserCmd
)
if
self
.
valgrind
:
time
.
sleep
(
2
)
self
.
running
=
0
tdLog
.
debug
(
"dnode:%d is stopped by kill -INT"
%
(
self
.
index
))
...
...
@@ -272,11 +277,16 @@ class TDDnode:
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -KILL %s"
%
processID
killCmd
=
"kill -KILL %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
for
port
in
range
(
6030
,
6041
):
fuserCmd
=
"fuser -k -n tcp %d"
%
port
os
.
system
(
fuserCmd
)
if
self
.
valgrind
:
time
.
sleep
(
2
)
self
.
running
=
0
tdLog
.
debug
(
"dnode:%d is stopped by kill -KILL"
%
(
self
.
index
))
...
...
@@ -325,7 +335,7 @@ class TDDnodes:
psCmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -KILL %s"
%
processID
killCmd
=
"kill -KILL %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
...
...
@@ -334,7 +344,7 @@ class TDDnodes:
psCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -KILL %s"
%
processID
killCmd
=
"kill -KILL %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
...
...
@@ -440,7 +450,7 @@ class TDDnodes:
psCmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -KILL %s"
%
processID
killCmd
=
"kill -KILL %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
...
...
@@ -449,7 +459,7 @@ class TDDnodes:
psCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
while
(
processID
):
killCmd
=
"kill -KILL %s"
%
processID
killCmd
=
"kill -KILL %s
> /dev/null 2>&1
"
%
processID
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录