提交 60d04f81 编写于 作者: Z zyyang

change

上级 e21088d5
...@@ -125,7 +125,7 @@ public class TSDBDriverTest { ...@@ -125,7 +125,7 @@ public class TSDBDriverTest {
@Test @Test
public void testConnectWithProperties() { public void testConnectWithProperties() {
final String jdbcUrl = "jdbc:TAOS://localhost:6030/test?user=root&password=taosdata"; final String jdbcUrl = "jdbc:TAOS://localhost:6030/log?user=root&password=taosdata";
Properties connProps = new Properties(); Properties connProps = new Properties();
connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8"); connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8");
connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8"); connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8");
...@@ -138,9 +138,9 @@ public class TSDBDriverTest { ...@@ -138,9 +138,9 @@ public class TSDBDriverTest {
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
if (!isTaosdActived) { if (!isTaosdActived) {
System.out.println(e.getMessage());
assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage()); assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage());
} } else {
else {
fail("failure - should not throw Exception"); fail("failure - should not throw Exception");
} }
} }
...@@ -148,7 +148,7 @@ public class TSDBDriverTest { ...@@ -148,7 +148,7 @@ public class TSDBDriverTest {
@Test @Test
public void testConnectWithConfigFile() { public void testConnectWithConfigFile() {
String jdbcUrl = "jdbc:TAOS://:/test?user=root&password=taosdata"; String jdbcUrl = "jdbc:TAOS://:/log?user=root&password=taosdata";
Properties connProps = new Properties(); Properties connProps = new Properties();
connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8"); connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8");
connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8"); connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册