use of java.sql.SQLTransientException in project jdk8u_jdk by JetBrains.
the class SQLTransientExceptionTests method test5.
/**
* Create SQLTransientException with message, SQLState, errorCode, and Throwable
*/
@Test
public void test5() {
SQLTransientException ex = new SQLTransientException(reason, state, errorCode, t);
assertTrue(ex.getMessage().equals(reason) && ex.getSQLState().equals(state) && cause.equals(ex.getCause().toString()) && ex.getErrorCode() == errorCode);
}
use of java.sql.SQLTransientException in project jdk8u_jdk by JetBrains.
the class SQLTransactionRollbackExceptionTests method test13.
/**
* Create SQLTransactionRollbackException and validate it is an instance of
* SQLNonTransientException
*/
@Test
public void test13() {
Exception ex = new SQLTransactionRollbackException();
assertTrue(ex instanceof SQLTransientException);
}
Aggregations