Search in sources :

Example 6 with ConnectionImple

use of com.arjuna.ats.internal.jdbc.ConnectionImple in project narayana by jbosstm.

the class ConnectionImpleTest method checkIfConnectionIsClosedWithTransaction.

@Test
public void checkIfConnectionIsClosedWithTransaction() throws Exception {
    transactionManager.begin();
    ConnectionImple connectionToTest = getConnectionToTest();
    // Initialises the connection
    connectionToTest.clearWarnings();
    connectionToTest.isClosed();
    verify(connection, times(2)).isClosed();
}
Also used : ConnectionImple(com.arjuna.ats.internal.jdbc.ConnectionImple) Test(org.junit.Test)

Aggregations

ConnectionImple (com.arjuna.ats.internal.jdbc.ConnectionImple)6 Test (org.junit.Test)6 SQLException (java.sql.SQLException)2 Synchronization (javax.transaction.Synchronization)2