提交 bef3b5a8 编写于 作者: Z zyyang

change

上级 f7539099
...@@ -11,15 +11,21 @@ public class TSDBDatabaseMetaDataTest { ...@@ -11,15 +11,21 @@ public class TSDBDatabaseMetaDataTest {
private Connection connection; private Connection connection;
@Before @Before
public void before() throws ClassNotFoundException, SQLException { public void before() {
Class.forName("com.taosdata.jdbc.TSDBDriver"); try {
Properties properties = new Properties(); Class.forName("com.taosdata.jdbc.TSDBDriver");
properties.setProperty(TSDBDriver.PROPERTY_KEY_HOST, host); Properties properties = new Properties();
properties.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8"); properties.setProperty(TSDBDriver.PROPERTY_KEY_HOST, host);
properties.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8"); properties.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8");
properties.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8"); properties.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8");
connection = DriverManager.getConnection("jdbc:TAOS://" + host + ":6030/?user=root&password=taosdata", properties); properties.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8");
metaData = connection.getMetaData().unwrap(TSDBDatabaseMetaData.class); connection = DriverManager.getConnection("jdbc:TAOS://" + host + ":6030/?user=root&password=taosdata", properties);
metaData = connection.getMetaData().unwrap(TSDBDatabaseMetaData.class);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
} }
@After @After
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册