mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved postgresql support
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.alibaba.druid.bvt.pool.vendor;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.postgresql.util.GT;
|
||||
import org.postgresql.util.PSQLException;
|
||||
import org.postgresql.util.PSQLState;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.pool.vendor.PGExceptionSorter;
|
||||
|
||||
public class PGExceptionSorterTest extends TestCase {
|
||||
|
||||
public void test_pg() throws Exception {
|
||||
PGExceptionSorter exSorter = new PGExceptionSorter();
|
||||
|
||||
PSQLException ex = new PSQLException(GT.tr("Expected an EOF from server, got: {0}", new Integer(0)),
|
||||
PSQLState.COMMUNICATION_ERROR);
|
||||
Assert.assertTrue(exSorter.isExceptionFatal(ex));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user