add testcase

This commit is contained in:
wenshao
2012-08-07 07:38:39 +08:00
parent 94e8ce55ec
commit f458f31edb
@@ -0,0 +1,28 @@
package com.alibaba.druid.bvt.pool;
import java.sql.Connection;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
public class ConfigErrorTest extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setTestOnBorrow(true);
}
protected void tearDown() throws Exception {
dataSource.close();
}
public void test_connect() throws Exception {
Connection conn = dataSource.getConnection();
conn.close();
}
}