Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8b402897
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
8b402897
编写于
2月 24, 2021
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2953]<test>: add jdbc cases into CI
上级
caa09b9a
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
55 addition
and
11 deletion
+55
-11
Jenkinsfile
Jenkinsfile
+2
-0
src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulConnectionTest.java
...test/java/com/taosdata/jdbc/rs/RestfulConnectionTest.java
+2
-2
tests/test-all.sh
tests/test-all.sh
+51
-9
未找到文件。
Jenkinsfile
浏览文件 @
8b402897
...
...
@@ -225,6 +225,8 @@ pipeline {
./test-all.sh b4fq
cd ${WKC}/tests
./test-all.sh p4
cd ${WKC}/tests
./test-all.sh full jdbc
date'''
}
}
...
...
src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulConnectionTest.java
浏览文件 @
8b402897
...
...
@@ -15,8 +15,8 @@ import java.util.Properties;
public
class
RestfulConnectionTest
{
//
private static final String host = "127.0.0.1";
private
static
final
String
host
=
"master"
;
private
static
final
String
host
=
"127.0.0.1"
;
//
private static final String host = "master";
private
static
Connection
conn
;
@Test
...
...
tests/test-all.sh
浏览文件 @
8b402897
...
...
@@ -7,6 +7,9 @@ GREEN_DARK='\033[0;32m'
GREEN_UNDERLINE
=
'\033[4;32m'
NC
=
'\033[0m'
tests_dir
=
`
pwd
`
IN_TDINTERNAL
=
"community"
function
dohavecore
(){
corefile
=
`
find
$corepath
-mmin
1
`
if
[
-n
"
$corefile
"
]
;
then
...
...
@@ -20,7 +23,6 @@ function runSimCaseOneByOne {
while
read
-r
line
;
do
if
[[
$line
=
~ ^./test.sh
*
]]
||
[[
$line
=
~ ^run
*
]]
;
then
case
=
`
echo
$line
|
grep
sim
$
|awk
'{print $NF}'
`
IN_TDINTERNAL
=
"community"
start_time
=
`
date
+%s
`
date
+%F
\
%T
|
tee
-a
out.log
if
[[
"
$tests_dir
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
...
...
@@ -52,7 +54,6 @@ function runSimCaseOneByOnefq {
case
=
`
echo
$line
|
grep
sim
$
|awk
'{print $NF}'
`
start_time
=
`
date
+%s
`
IN_TDINTERNAL
=
"community"
date
+%F
\
%T
|
tee
-a
out.log
if
[[
"
$tests_dir
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
echo
-n
$case
...
...
@@ -143,12 +144,13 @@ function runPyCaseOneByOnefq {
fi
done
<
$1
}
totalFailed
=
0
totalPyFailed
=
0
totalJDBCFailed
=
0
tests_dir
=
`
pwd
`
corepath
=
`
grep
-oP
'.*(?=core_)'
/proc/sys/kernel/core_pattern||grep
-oP
'.*(?=core-)'
/proc/sys/kernel/core_pattern
`
if
[
"
$2
"
!=
"python"
]
;
then
if
[
"
$2
"
!=
"
jdbc"
]
&&
[
"
$2
"
!=
"
python"
]
;
then
echo
"### run TSIM test case ###"
cd
$tests_dir
/script
...
...
@@ -217,11 +219,10 @@ if [ "$2" != "python" ]; then
fi
fi
if
[
"
$2
"
!=
"sim"
]
;
then
if
[
"
$2
"
!=
"sim"
]
&&
[
"
$2
"
!=
"jdbc"
]
;
then
echo
"### run Python test case ###"
cd
$tests_dir
IN_TDINTERNAL
=
"community"
if
[[
"
$tests_dir
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
cd
../..
...
...
@@ -286,4 +287,45 @@ if [ "$2" != "sim" ]; then
fi
fi
exit
$((
$totalFailed
+
$totalPyFailed
))
if
[
"
$2
"
!=
"sim"
]
&&
[
"
$2
"
!=
"python"
]
;
then
echo
"### run JDBC test case ###"
echo
$tests_dir
if
[[
"
$tests_dir
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
cd
../../
else
cd
../
fi
cd
debug/
nohup
build/bin/taosd
-c
/etc/taos/
>
/dev/null 2>&1 &
sleep
30
cd
$tests_dir
/../src/connector/jdbc
mvn
test
>
jdbc-out.log 2>&1
tail
-n
20 jdbc-out.log
cases
=
`
grep
'Tests run'
jdbc-out.log |
awk
'END{print $3}'
`
totalJDBCCases
=
`
echo
${
cases
/%,
}
`
failed
=
`
grep
'Tests run'
jdbc-out.log |
awk
'END{print $5}'
`
JDBCFailed
=
`
echo
${
failed
/%,
}
`
error
=
`
grep
'Tests run'
jdbc-out.log |
awk
'END{print $7}'
`
JDBCError
=
`
echo
${
error
/%,
}
`
totalJDBCFailed
=
`
expr
$JDBCFailed
+
$JDBCError
`
totalJDBCSuccess
=
`
expr
$totalJDBCCases
-
$totalJDBCFailed
`
if
[
"
$totalJDBCSuccess
"
-gt
"0"
]
;
then
echo
-e
"
\n
${
GREEN
}
### Total
$totalJDBCSuccess
JDBC case(s) succeed! ###
${
NC
}
"
fi
if
[
"
$totalJDBCFailed
"
-ne
"0"
]
;
then
echo
-e
"
\n
${
RED
}
### Total
$totalJDBCFailed
JDBC case(s) failed! ###
${
NC
}
"
fi
dohavecore 1
fi
exit
$((
$totalFailed
+
$totalPyFailed
+
$totalJDBCFailed
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录