未验证 提交 092e7f9c 编写于 作者: H huolibo 提交者: GitHub

[TD-11515]<fix>(connector):add jdbc test to jenkins (#9372)

* [TD-11515]<fix>(connector):add jdbc test to jenkins

* [TD-11515]<fix>(connector):add jdbc test to jenkins
上级 5fb5abfd
package com.taosdata.jdbc.confprops; package com.taosdata.jdbc.confprops;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import java.sql.Connection; import java.sql.Connection;
...@@ -13,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger; ...@@ -13,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream; import java.util.stream.IntStream;
@Ignore
public class HttpKeepAliveTest { public class HttpKeepAliveTest {
private static final String host = "127.0.0.1"; private static final String host = "127.0.0.1";
......
...@@ -14,4 +14,32 @@ stopTaosd ...@@ -14,4 +14,32 @@ stopTaosd
rm -rf /var/lib/taos/* rm -rf /var/lib/taos/*
rm -rf /var/log/taos/* rm -rf /var/log/taos/*
nohup taosd -c /etc/taos/ > /dev/null 2>&1 & nohup taosd -c /etc/taos/ > /dev/null 2>&1 &
nohup taosadapter -c /etc/taos/taosadapter.toml > /dev/null 2>&1 &
sleep 10 sleep 10
cd ../../../../
WKC=`pwd`
cd ${WKC}/src/connector/jdbc
mvn clean 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}"
exit 8
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册