mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@431 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.alibaba.druid.pool;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class Test_kyline extends TestCase {
|
||||
|
||||
private String url = "jdbc:mysql://10.20.141.150:8066/amoeba";
|
||||
private String user = "root";
|
||||
private String password = "12345";
|
||||
private String driver = "com.mysql.jdbc.Driver";
|
||||
|
||||
public void test_0() throws Exception {
|
||||
DruidDataSource ds = new DruidDataSource();
|
||||
ds.setUrl(url);
|
||||
ds.setUsername(user);
|
||||
ds.setPassword(password);
|
||||
ds.setDriverClassName(driver);
|
||||
|
||||
//DriverManager.getConnection(url, user, password);
|
||||
|
||||
Connection conn = ds.getConnection();
|
||||
conn.close();
|
||||
|
||||
ds.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user