Search in sources :

Example 6 with MySqlExceptionSorter

use of com.alibaba.druid.pool.vendor.MySqlExceptionSorter in project druid by alibaba.

the class MySqlExceptionSorterTest method test_false.

public void test_false() throws Exception {
    MySqlExceptionSorter sorter = new MySqlExceptionSorter();
    Assert.assertFalse(sorter.isExceptionFatal(new SQLException("", "", -10001)));
}
Also used : MySqlExceptionSorter(com.alibaba.druid.pool.vendor.MySqlExceptionSorter) SQLException(java.sql.SQLException)

Example 7 with MySqlExceptionSorter

use of com.alibaba.druid.pool.vendor.MySqlExceptionSorter in project druid by alibaba.

the class MySqlExceptionSorterTest method test_true_2.

public void test_true_2() throws Exception {
    MySqlExceptionSorter sorter = new MySqlExceptionSorter();
    Assert.assertTrue(sorter.isExceptionFatal(new SQLException("", "08xx", 0)));
}
Also used : MySqlExceptionSorter(com.alibaba.druid.pool.vendor.MySqlExceptionSorter) SQLException(java.sql.SQLException)

Example 8 with MySqlExceptionSorter

use of com.alibaba.druid.pool.vendor.MySqlExceptionSorter in project druid by alibaba.

the class MySqlExceptionSorterTest method test_true.

public void test_true() throws Exception {
    MySqlExceptionSorter sorter = new MySqlExceptionSorter();
    Assert.assertTrue(sorter.isExceptionFatal(new SQLException("", "", 1040)));
}
Also used : MySqlExceptionSorter(com.alibaba.druid.pool.vendor.MySqlExceptionSorter) SQLException(java.sql.SQLException)

Example 9 with MySqlExceptionSorter

use of com.alibaba.druid.pool.vendor.MySqlExceptionSorter in project druid by alibaba.

the class MySqlExceptionSorterTest_oceanbase method test_false_1.

public void test_false_1() throws Exception {
    MySqlExceptionSorter sorter = new MySqlExceptionSorter();
    Assert.assertFalse(sorter.isExceptionFatal(new SQLException("", "", -8000)));
}
Also used : MySqlExceptionSorter(com.alibaba.druid.pool.vendor.MySqlExceptionSorter) SQLException(java.sql.SQLException)

Example 10 with MySqlExceptionSorter

use of com.alibaba.druid.pool.vendor.MySqlExceptionSorter in project druid by alibaba.

the class MySqlExceptionSorterTest_oceanbase method test_false.

public void test_false() throws Exception {
    MySqlExceptionSorter sorter = new MySqlExceptionSorter();
    Assert.assertFalse(sorter.isExceptionFatal(new SQLException("", "", -10001)));
}
Also used : MySqlExceptionSorter(com.alibaba.druid.pool.vendor.MySqlExceptionSorter) SQLException(java.sql.SQLException)

Aggregations

MySqlExceptionSorter (com.alibaba.druid.pool.vendor.MySqlExceptionSorter)11 SQLException (java.sql.SQLException)11 MockDriver (com.alibaba.druid.mock.MockDriver)1 MockStatementBase (com.alibaba.druid.mock.MockStatementBase)1 DruidDataSource (com.alibaba.druid.pool.DruidDataSource)1 Connection (java.sql.Connection)1 ResultSet (java.sql.ResultSet)1 Properties (java.util.Properties)1