Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5503ec72
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5503ec72
编写于
12月 23, 2022
作者:
H
Hui Li
提交者:
GitHub
12月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19072 from taosdata/test/TD-21435
test: update script to stop taosadapter service
上级
4e425c54
66e22bb7
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
37 addition
and
17 deletion
+37
-17
tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py
...test/5-taos-tools/taosbenchmark/auto_create_table_json.py
+2
-0
tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py
...p-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py
+2
-1
tests/develop-test/5-taos-tools/taosbenchmark/query_json.py
tests/develop-test/5-taos-tools/taosbenchmark/query_json.py
+2
-2
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+2
-2
tests/pytest/util/taosadapter.py
tests/pytest/util/taosadapter.py
+6
-9
tests/system-test/2-query/db.py
tests/system-test/2-query/db.py
+23
-3
未找到文件。
tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py
浏览文件 @
5503ec72
...
...
@@ -153,6 +153,8 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.`stb4-2`"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tAdapter
.
stop
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py
浏览文件 @
5503ec72
...
...
@@ -321,6 +321,7 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.stb where t13 like 'b1%' or t13 like 'b2%'"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tAdapter
.
stop
()
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/develop-test/5-taos-tools/taosbenchmark/query_json.py
浏览文件 @
5503ec72
...
...
@@ -116,7 +116,7 @@ class TDTestCase:
assert
times
==
1
,
"result is %s != expect: 1"
%
times
tAdapter
.
stop
()
def
stop
(
self
):
...
...
tests/parallel_test/cases.task
浏览文件 @
5503ec72
...
...
@@ -481,7 +481,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -
N 3 -n 3 -
R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py
...
...
tests/pytest/util/taosadapter.py
浏览文件 @
5503ec72
...
...
@@ -227,7 +227,7 @@ class TAdapter:
time
.
sleep
(
0.1
)
def
stop
(
self
,
force_kill
=
False
):
signal
=
"-
SIGKILL"
if
force_kill
else
"-SIGTERM
"
signal
=
"-
9"
if
force_kill
else
"-15
"
if
self
.
remoteIP
:
self
.
remote_exec
(
self
.
taosadapter_cfg_dict
,
"tAdapter.running=1
\n
tAdapter.stop()"
)
...
...
@@ -239,15 +239,12 @@ class TAdapter:
if
self
.
running
!=
0
:
psCmd
=
f
"ps -ef|grep -w
{
toBeKilled
}
| grep -v grep | awk '{{print $2}}'"
# psCmd = f"pgrep {toBeKilled}"
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
).
strip
()
while
(
processID
):
killCmd
=
f
"pkill
{
signal
}
{
processID
}
> /dev/null "
killCmd
=
"kill %s %s > /dev/null 2>&1"
%
(
signal
,
processID
)
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
).
strip
()
if
not
platform
.
system
().
lower
()
==
'windows'
:
port
=
6041
fuserCmd
=
f
"fuser -k -n tcp
{
port
}
> /dev/null"
...
...
tests/system-test/2-query/db.py
浏览文件 @
5503ec72
...
...
@@ -43,15 +43,35 @@ class TDTestCase:
tdSql
.
query
(
"select count(c1) from dbns.ntb interval(1b)"
)
tdSql
.
checkRows
(
2
)
def
case2
(
self
):
tdSql
.
query
(
"show variables"
)
tdSql
.
checkRows
(
4
)
for
i
in
range
(
self
.
replicaVar
):
tdSql
.
query
(
"show dnode %d variables like 'debugFlag'"
%
(
i
+
1
))
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
i
+
1
)
tdSql
.
checkData
(
0
,
1
,
'debugFlag'
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
query
(
"show dnode 1 variables like '%debugFlag'"
)
tdSql
.
checkRows
(
21
)
tdSql
.
query
(
"show dnode 1 variables like '____debugFlag'"
)
tdSql
.
checkRows
(
2
)
def
run
(
self
):
# sourcery skip: extract-duplicate-method, remove-redundant-fstring
tdSql
.
prepare
()
tdSql
.
prepare
(
replica
=
self
.
replicaVar
)
tdLog
.
printNoPrefix
(
"==========start case1 run ..............."
)
tdLog
.
printNoPrefix
(
"==========start case1 run ..............."
)
self
.
case1
()
tdLog
.
printNoPrefix
(
"==========end case1 run ..............."
)
tdLog
.
printNoPrefix
(
"==========start case2 run ..............."
)
self
.
case2
()
tdLog
.
printNoPrefix
(
"==========end case2 run ..............."
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录