Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f7b79718
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,发现更多精彩内容 >>
提交
f7b79718
编写于
5月 19, 2022
作者:
S
slzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: modify test case
上级
b55d49b8
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
9 addition
and
10 deletion
+9
-10
tests/system-test/0-others/udfTest.py
tests/system-test/0-others/udfTest.py
+9
-10
未找到文件。
tests/system-test/0-others/udfTest.py
浏览文件 @
f7b79718
...
@@ -44,8 +44,8 @@ class TDTestCase:
...
@@ -44,8 +44,8 @@ class TDTestCase:
libudf1
=
subprocess
.
Popen
(
'find %s -name "libudf1.so"|grep lib|head -n1'
%
projPath
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
).
stdout
.
read
().
decode
(
"utf-8"
)
libudf1
=
subprocess
.
Popen
(
'find %s -name "libudf1.so"|grep lib|head -n1'
%
projPath
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
).
stdout
.
read
().
decode
(
"utf-8"
)
libudf2
=
subprocess
.
Popen
(
'find %s -name "libudf2.so"|grep lib|head -n1'
%
projPath
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
).
stdout
.
read
().
decode
(
"utf-8"
)
libudf2
=
subprocess
.
Popen
(
'find %s -name "libudf2.so"|grep lib|head -n1'
%
projPath
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
).
stdout
.
read
().
decode
(
"utf-8"
)
os
.
system
(
"mkdir /tmp/udf/"
)
os
.
system
(
"mkdir /tmp/udf/"
)
os
.
system
(
"
sudo
cp %s /tmp/udf/ "
%
libudf1
.
replace
(
"
\n
"
,
""
))
os
.
system
(
"cp %s /tmp/udf/ "
%
libudf1
.
replace
(
"
\n
"
,
""
))
os
.
system
(
"
sudo
cp %s /tmp/udf/ "
%
libudf2
.
replace
(
"
\n
"
,
""
))
os
.
system
(
"cp %s /tmp/udf/ "
%
libudf2
.
replace
(
"
\n
"
,
""
))
def
prepare_data
(
self
):
def
prepare_data
(
self
):
...
@@ -580,7 +580,7 @@ class TDTestCase:
...
@@ -580,7 +580,7 @@ class TDTestCase:
cfgPath
=
buildPath
+
"/../sim/dnode1/cfg"
cfgPath
=
buildPath
+
"/../sim/dnode1/cfg"
udfdPath
=
buildPath
+
'/build/bin/udfd'
udfdPath
=
buildPath
+
'/build/bin/udfd'
for
i
in
range
(
5
):
for
i
in
range
(
3
):
tdLog
.
info
(
" loop restart udfd %d_th"
%
i
)
tdLog
.
info
(
" loop restart udfd %d_th"
%
i
)
...
@@ -588,7 +588,7 @@ class TDTestCase:
...
@@ -588,7 +588,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
169.661427555
)
tdSql
.
checkData
(
0
,
0
,
169.661427555
)
tdSql
.
checkData
(
0
,
1
,
169.661427555
)
tdSql
.
checkData
(
0
,
1
,
169.661427555
)
# stop udfd cmds
# stop udfd cmds
get_processID
=
"ps -ef | grep -w udfd | grep
'root' | grep
-v grep| grep -v defunct | awk '{print $2}'"
get_processID
=
"ps -ef | grep -w udfd | grep -v grep| grep -v defunct | awk '{print $2}'"
processID
=
subprocess
.
check_output
(
get_processID
,
shell
=
True
).
decode
(
"utf-8"
)
processID
=
subprocess
.
check_output
(
get_processID
,
shell
=
True
).
decode
(
"utf-8"
)
stop_udfd
=
" kill -9 %s"
%
processID
stop_udfd
=
" kill -9 %s"
%
processID
os
.
system
(
stop_udfd
)
os
.
system
(
stop_udfd
)
...
@@ -622,7 +622,6 @@ class TDTestCase:
...
@@ -622,7 +622,6 @@ class TDTestCase:
def
restart_taosd_query_udf
(
self
):
def
restart_taosd_query_udf
(
self
):
for
i
in
range
(
5
):
for
i
in
range
(
5
):
time
.
sleep
(
5
)
tdLog
.
info
(
" this is %d_th restart taosd "
%
i
)
tdLog
.
info
(
" this is %d_th restart taosd "
%
i
)
tdSql
.
execute
(
"use db "
)
tdSql
.
execute
(
"use db "
)
tdSql
.
query
(
"select count(*) from stb1"
)
tdSql
.
query
(
"select count(*) from stb1"
)
...
@@ -631,9 +630,8 @@ class TDTestCase:
...
@@ -631,9 +630,8 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
169.661427555
)
tdSql
.
checkData
(
0
,
0
,
169.661427555
)
tdSql
.
checkData
(
0
,
1
,
169.661427555
)
tdSql
.
checkData
(
0
,
1
,
169.661427555
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
time
.
sleep
(
2
)
tdDnodes
.
start
(
1
)
tdDnodes
.
start
(
1
)
time
.
sleep
(
5
)
time
.
sleep
(
2
)
...
@@ -645,12 +643,13 @@ class TDTestCase:
...
@@ -645,12 +643,13 @@ class TDTestCase:
self
.
create_udf_function
()
self
.
create_udf_function
()
self
.
basic_udf_query
()
self
.
basic_udf_query
()
self
.
loop_kill_udfd
()
self
.
loop_kill_udfd
()
self
.
restart_taosd_query_udf
()
#
self.restart_taosd_query_udf()
self
.
unexpected_create
()
self
.
unexpected_create
()
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf2 "
)
tdSql
.
execute
(
" drop function udf2 "
)
self
.
create_udf_function
()
self
.
create_udf_function
()
# self.basic_udf_query()
sleep
(
2
)
self
.
basic_udf_query
()
self
.
test_function_name
()
self
.
test_function_name
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录