use of org.mule.runtime.api.tx.TransactionException in project mule by mulesoft.
the class TransactionCoordinationTestCase method testCommitDoesntFailOnException.
@Test
public void testCommitDoesntFailOnException() throws Exception {
assertThat(tc.getTransaction(), nullValue());
Transaction tx = mock(Transaction.class);
doThrow(new TransactionException((Throwable) null)).when(tx).commit();
TransactionCoordination.getInstance().commitCurrentTransaction();
}
use of org.mule.runtime.api.tx.TransactionException in project mule by mulesoft.
the class TransactionCoordinationTestCase method testRollbackDoesntFailOnException.
@Test
public void testRollbackDoesntFailOnException() throws Exception {
assertThat(tc.getTransaction(), nullValue());
Transaction tx = mock(Transaction.class);
doThrow(new TransactionException((Throwable) null)).when(tx).rollback();
TransactionCoordination.getInstance().rollbackCurrentTransaction();
}
Aggregations