Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
889872c2
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
889872c2
编写于
12月 21, 2022
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: update script to stop taosadapter service
上级
4b7eb1e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
15 deletion
+31
-15
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/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
+19
-3
未找到文件。
tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py
浏览文件 @
889872c2
...
@@ -153,6 +153,8 @@ class TDTestCase:
...
@@ -153,6 +153,8 @@ class TDTestCase:
tdSql
.
query
(
"select count(*) from db.`stb4-2`"
)
tdSql
.
query
(
"select count(*) from db.`stb4-2`"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
checkData
(
0
,
0
,
160
)
tAdapter
.
stop
()
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py
浏览文件 @
889872c2
...
@@ -320,7 +320,8 @@ class TDTestCase:
...
@@ -320,7 +320,8 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
query
(
"select count(*) from db.stb where t13 like 'b1%' or t13 like 'b2%'"
)
tdSql
.
query
(
"select count(*) from db.stb where t13 like 'b1%' or t13 like 'b2%'"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
checkData
(
0
,
0
,
160
)
tAdapter
.
stop
()
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/develop-test/5-taos-tools/taosbenchmark/query_json.py
浏览文件 @
889872c2
...
@@ -116,11 +116,11 @@ class TDTestCase:
...
@@ -116,11 +116,11 @@ class TDTestCase:
assert
times
==
1
,
"result is %s != expect: 1"
%
times
assert
times
==
1
,
"result is %s != expect: 1"
%
times
tAdapter
.
stop
()
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/util/taosadapter.py
浏览文件 @
889872c2
...
@@ -227,7 +227,7 @@ class TAdapter:
...
@@ -227,7 +227,7 @@ class TAdapter:
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
def
stop
(
self
,
force_kill
=
False
):
def
stop
(
self
,
force_kill
=
False
):
signal
=
"-
SIGKILL"
if
force_kill
else
"-SIGTERM
"
signal
=
"-
9"
if
force_kill
else
"-15
"
if
self
.
remoteIP
:
if
self
.
remoteIP
:
self
.
remote_exec
(
self
.
taosadapter_cfg_dict
,
"tAdapter.running=1
\n
tAdapter.stop()"
)
self
.
remote_exec
(
self
.
taosadapter_cfg_dict
,
"tAdapter.running=1
\n
tAdapter.stop()"
)
...
@@ -238,16 +238,13 @@ class TAdapter:
...
@@ -238,16 +238,13 @@ class TAdapter:
if
self
.
running
!=
0
:
if
self
.
running
!=
0
:
psCmd
=
f
"ps -ef|grep -w
{
toBeKilled
}
| grep -v grep | awk '{{print $2}}'"
psCmd
=
f
"ps -ef|grep -w
{
toBeKilled
}
| grep -v grep | awk '{{print $2}}'"
# psCmd = f"pgrep {toBeKilled}"
# psCmd = f"pgrep {toBeKilled}"
processID
=
subprocess
.
check_output
(
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
).
strip
()
psCmd
,
shell
=
True
)
while
(
processID
):
killCmd
=
"kill %s %s > /dev/null 2>&1"
%
(
signal
,
processID
)
while
(
processID
):
killCmd
=
f
"pkill
{
signal
}
{
processID
}
> /dev/null "
os
.
system
(
killCmd
)
os
.
system
(
killCmd
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
).
strip
()
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
if
not
platform
.
system
().
lower
()
==
'windows'
:
if
not
platform
.
system
().
lower
()
==
'windows'
:
port
=
6041
port
=
6041
fuserCmd
=
f
"fuser -k -n tcp
{
port
}
> /dev/null"
fuserCmd
=
f
"fuser -k -n tcp
{
port
}
> /dev/null"
...
...
tests/system-test/2-query/db.py
浏览文件 @
889872c2
...
@@ -42,16 +42,32 @@ class TDTestCase:
...
@@ -42,16 +42,32 @@ class TDTestCase:
tdSql
.
query
(
"select count(c1) from dbns.ntb interval(1b)"
)
tdSql
.
query
(
"select count(c1) from dbns.ntb interval(1b)"
)
tdSql
.
checkRows
(
2
)
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
.
execute
(
"alter dnode 2 'debugFlag 135'"
)
def
run
(
self
):
# sourcery skip: extract-duplicate-method, remove-redundant-fstring
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
()
self
.
case1
()
tdLog
.
printNoPrefix
(
"==========end case1 run ..............."
)
tdLog
.
printNoPrefix
(
"==========end case1 run ..............."
)
tdLog
.
printNoPrefix
(
"==========start case2 run ..............."
)
self
.
case2
()
tdLog
.
printNoPrefix
(
"==========end case2 run ..............."
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录