Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9878c7b9
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
未验证
提交
9878c7b9
编写于
5月 09, 2020
作者:
S
slguan
提交者:
GitHub
5月 09, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1860 from taosdata/hotfix/fix-issue-pytest-stop-by-pkill
fix issue pytest stop dnode by pkill.
上级
4147090d
22449695
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
129 addition
and
136 deletion
+129
-136
.travis.yml
.travis.yml
+2
-2
tests/pytest/insert/binary.py
tests/pytest/insert/binary.py
+0
-1
tests/pytest/smoketest.sh
tests/pytest/smoketest.sh
+56
-112
tests/pytest/test.py
tests/pytest/test.py
+7
-7
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+64
-14
未找到文件。
.travis.yml
浏览文件 @
9878c7b9
...
...
@@ -72,8 +72,8 @@ matrix:
fi
done
grep 'definitely lost' mem-error-out.txt | uniq | tee uniq-definitely-lost-out.txt
for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $
7}'`
grep 'definitely lost
:
' mem-error-out.txt | uniq | tee uniq-definitely-lost-out.txt
for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $
4}'`
do
if [ -n "$defiMemError" ]; then
if [ "$defiMemError" -gt 16 ]; then
...
...
tests/pytest/insert/binary.py
浏览文件 @
9878c7b9
...
...
@@ -14,7 +14,6 @@ class TDTestCase:
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
'=============== step1'
)
tdLog
.
info
(
'create table tb (ts timestamp, speed binary(5))'
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed binary(5))'
)
...
...
tests/pytest/smoketest.sh
浏览文件 @
9878c7b9
#!/bin/bash
python3 ./test.py
$1
-f
insert/basic.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/int.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/float.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/bigint.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/bool.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/double.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/smallint.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/tinyint.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/binary.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/date.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
insert/nchar.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
table/column_name.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
table/column_num.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
table/db_table.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataLastTO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataLastT.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataTO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataT.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHeadOverlap.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHeadPartOverlap.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHORestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHPORestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHRestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importLastSub.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1HO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1HPO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1H.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1S.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1Sub.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1TO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1TPO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock1T.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2HO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2HPO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2H.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2S.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2Sub.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2TO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2TPO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlock2T.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importBlockbetween.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importCacheFileSub.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importCacheFileTO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importCacheFileT.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importDataLastSub.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importHead.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importLastTO.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importLastT.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importSpan.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importSRestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importSubRestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importTailOverlap.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importTail.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importTORestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importTPORestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
python3 ./test.py
$1
-f
import_merge/importTRestart.py
python3 ./test.py
-s
$1
sleep
1
python3 ./test.py
$1
-s
&&
sleep
1
tests/pytest/test.py
浏览文件 @
9878c7b9
...
...
@@ -92,23 +92,23 @@ if __name__ == "__main__":
tdDnodes
.
start
(
1
)
if
masterIp
==
""
:
host
=
'127.0.0.1'
host
=
'127.0.0.1'
else
:
host
=
masterIp
host
=
masterIp
tdLog
.
notice
(
"Procedures for tdengine deployed in %s"
%
(
host
))
tdLog
.
info
(
"Procedures for tdengine deployed in %s"
%
(
host
))
if
testCluster
:
tdLog
.
notice
(
"Procedures for testing cluster"
)
tdLog
.
info
(
"Procedures for testing cluster"
)
if
fileName
==
"all"
:
tdCases
.
runAllCluster
()
else
:
tdCases
.
runOneCluster
(
fileName
)
else
:
tdLog
.
notice
(
"Procedures for testing self-deployment"
)
tdLog
.
info
(
"Procedures for testing self-deployment"
)
conn
=
taos
.
connect
(
host
,
config
=
tdDnodes
.
getSimCfgPath
())
host
,
config
=
tdDnodes
.
getSimCfgPath
())
if
fileName
==
"all"
:
tdCases
.
runAllLinux
(
conn
)
else
:
...
...
tests/pytest/util/dnodes.py
浏览文件 @
9878c7b9
...
...
@@ -205,24 +205,47 @@ class TDDnode:
time
.
sleep
(
2
)
def
stop
(
self
):
if
self
.
valgrind
==
0
:
toBeKilled
=
"taosd"
else
:
toBeKilled
=
"valgrind.bin"
if
self
.
running
!=
0
:
cmd
=
"ps -ef|grep -w taosd | grep '%s' | grep -v grep | awk '{print $2}' && pkill -sigint taosd"
%
(
self
.
cfgDir
)
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
tdLog
.
debug
(
"dnode:%d is stopped by kill -SIGINT"
%
(
self
.
index
))
killCmd
=
"ps -ef|grep -w %s| grep '%s' | grep -v grep | awk '{print $2}' | xargs kill -INT"
%
(
toBeKilled
,
self
.
cfgDir
)
psCmd
=
"ps -ef|grep -w %s| grep -v grep | awk '{print $2}'"
%
toBeKilled
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
tdLog
.
debug
(
"dnode:%d is stopped by kill -INT"
%
(
self
.
index
))
tdLog
.
debug
(
"wait 2 seconds for the dnode:%d to stop."
%
(
self
.
index
))
time
.
sleep
(
2
)
def
forcestop
(
self
):
if
self
.
valgrind
==
0
:
toBeKilled
=
"taosd"
else
:
toBeKilled
=
"valgrind.bin"
if
self
.
running
!=
0
:
cmd
=
"ps -ef|grep -w taosd | grep '%s' | grep -v grep | awk '{print $2}' && pkill -sigkill taosd"
%
(
self
.
cfgDir
)
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
tdLog
.
debug
(
"dnode:%d is stopped by kill -9"
%
(
self
.
index
))
killCmd
=
"ps -ef|grep -w %s| grep '%s' | grep -v grep | awk '{print $2}' | xargs kill -KILL"
%
(
toBeKilled
,
self
.
cfgDir
)
psCmd
=
"ps -ef|grep -w %s| grep -v grep | awk '{print $2}'"
%
toBeKilled
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
tdLog
.
debug
(
"dnode:%d is stopped by kill -KILL"
%
(
self
.
index
))
tdLog
.
debug
(
"wait 2 seconds for the dnode:%d to stop."
%
(
self
.
index
))
...
...
@@ -268,8 +291,21 @@ class TDDnodes:
self
.
dnodes
.
append
(
TDDnode
(
10
))
def
init
(
self
,
path
):
cmd
=
"ps -ef|grep -w taosd | grep 'taosd' | grep -v grep | awk '{print $2}' && pkill -sigkill taosd"
os
.
system
(
cmd
)
killCmd
=
"ps -ef|grep -w taosd | grep -v grep | awk '{print $2}' | xargs kill -KILL"
psCmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
killCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}' | xargs kill -KILL"
psCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
binPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
binPath
=
binPath
+
"/../../../debug/"
...
...
@@ -361,8 +397,22 @@ class TDDnodes:
os
.
system
(
cmd
)
# if os.system(cmd) != 0 :
# tdLog.exit(cmd)
cmd
=
"ps -ef | grep -w taosd | grep 'dnode' | grep -v grep | awk '{print $2}' && pkill -sigkill taosd"
os
.
system
(
cmd
)
killCmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}' | xargs kill -KILL"
psCmd
=
"ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
killCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}' | xargs kill -KILL"
psCmd
=
"ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
while
(
processID
):
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
# if os.system(cmd) != 0 :
# tdLog.exit(cmd)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录