mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正Oracle Driver下 FilterChainImpl的unwrap的bug
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@322 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.alibaba.druid.pool;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.pool.vendor.MySqlExceptionSorter;
|
||||
|
||||
public class TestOracle extends TestCase {
|
||||
|
||||
private String jdbcUrl;
|
||||
private String user;
|
||||
private String password;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
jdbcUrl = "jdbc:oracle:thin:@10.20.149.85:1521:ocnauto";
|
||||
user = "alibaba";
|
||||
password = "ccbuauto";
|
||||
}
|
||||
|
||||
public void test_0() throws Exception {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
dataSource.setUrl(jdbcUrl);
|
||||
dataSource.setUsername(user);
|
||||
dataSource.setPassword(password);
|
||||
dataSource.setFilters("stat");
|
||||
dataSource.setExceptionSoter(MySqlExceptionSorter.class.getName());
|
||||
|
||||
Connection conn = dataSource.getConnection();
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user