Search in sources :

Example 76 with MockConnection

use of com.alibaba.druid.mock.MockConnection in project druid by alibaba.

the class MSSQLValidConnectionCheckerTest method test_0.

public void test_0() throws Exception {
    MSSQLValidConnectionChecker checker = new MSSQLValidConnectionChecker();
    MockConnection conn = new MockConnection();
    Assert.assertTrue(checker.isValidConnection(conn, "select 1", 10));
}
Also used : MSSQLValidConnectionChecker(com.alibaba.druid.pool.vendor.MSSQLValidConnectionChecker) MockConnection(com.alibaba.druid.mock.MockConnection)

Aggregations

MockConnection (com.alibaba.druid.mock.MockConnection)76 PreparedStatement (java.sql.PreparedStatement)53 SQLException (java.sql.SQLException)53 DruidPooledConnection (com.alibaba.druid.pool.DruidPooledConnection)49 Statement (java.sql.Statement)38 Connection (java.sql.Connection)22 DruidDataSource (com.alibaba.druid.pool.DruidDataSource)13 MockDriver (com.alibaba.druid.mock.MockDriver)8 MockPreparedStatement (com.alibaba.druid.mock.MockPreparedStatement)7 MockStatement (com.alibaba.druid.mock.MockStatement)5 MockCallableStatement (com.alibaba.druid.mock.MockCallableStatement)4 DruidConnectionHolder (com.alibaba.druid.pool.DruidConnectionHolder)3 PreparedStatementKey (com.alibaba.druid.pool.DruidPooledPreparedStatement.PreparedStatementKey)3 PreparedStatementHolder (com.alibaba.druid.pool.PreparedStatementHolder)3 MSSQLValidConnectionChecker (com.alibaba.druid.pool.vendor.MSSQLValidConnectionChecker)3 Field (java.lang.reflect.Field)3 ResultSet (java.sql.ResultSet)3 PoolableWrapper (com.alibaba.druid.pool.PoolableWrapper)2 DruidNativeJdbcExtractor (com.alibaba.druid.support.spring.DruidNativeJdbcExtractor)2 ConnectionHandle (com.jolbox.bonecp.ConnectionHandle)2