From 0b6e8c0a9710e877e56ce46dba37c04eae90273a Mon Sep 17 00:00:00 2001 From: zyyang Date: Fri, 13 Nov 2020 13:15:58 +0800 Subject: [PATCH] change --- .../java/com/taosdata/jdbc/TSDBConnection.java | 3 ++- tests/examples/JDBC/mybatisplus-demo/pom.xml | 14 ++++++++++++++ .../src/main/resources/application-prod.yml | 2 +- .../mybatisplusdemo/mapper/WeatherMapperTest.java | 5 ++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java index 294544ed47..f93412ffec 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConnection.java @@ -197,7 +197,8 @@ public class TSDBConnection implements Connection { public SQLWarning getWarnings() throws SQLException { //todo: implement getWarnings according to the warning messages returned from TDengine - throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); + return null; +// throw new SQLException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); } public void clearWarnings() throws SQLException { diff --git a/tests/examples/JDBC/mybatisplus-demo/pom.xml b/tests/examples/JDBC/mybatisplus-demo/pom.xml index 8f5c04d4da..e1bbcd9532 100644 --- a/tests/examples/JDBC/mybatisplus-demo/pom.xml +++ b/tests/examples/JDBC/mybatisplus-demo/pom.xml @@ -77,6 +77,20 @@ org.springframework.boot spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + 2.17 + + + **/*Test.java + + + **/Abstract*.java + + + diff --git a/tests/examples/JDBC/mybatisplus-demo/src/main/resources/application-prod.yml b/tests/examples/JDBC/mybatisplus-demo/src/main/resources/application-prod.yml index ebc13736b2..9eb2ee66eb 100644 --- a/tests/examples/JDBC/mybatisplus-demo/src/main/resources/application-prod.yml +++ b/tests/examples/JDBC/mybatisplus-demo/src/main/resources/application-prod.yml @@ -3,7 +3,7 @@ spring: driver-class-name: com.taosdata.jdbc.TSDBDriver url: jdbc:TAOS://master:6030/mp_test user: root - password: 123456 + password: taosdata # driver-class-name: com.mysql.jdbc.Driver # url: jdbc:mysql://master:3306/test?useSSL=false diff --git a/tests/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapperTest.java b/tests/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapperTest.java index 7fc723a0b0..4354de883d 100644 --- a/tests/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapperTest.java +++ b/tests/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapperTest.java @@ -1,17 +1,16 @@ package com.taosdata.example.mybatisplusdemo.mapper; - import com.taosdata.example.mybatisplusdemo.domain.Weather; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; -@RunWith(SpringRunner.class) +@RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest public class WeatherMapperTest { -- GitLab