use of com.arjuna.ats.internal.jts.orbspecific.interposition.resources.arjuna.ServerTopLevelAction in project narayana by jbosstm.
the class ServerTopLevelActionUnitTest method testRollback.
@Test
public void testRollback() throws Exception {
ControlImple cont = new ControlImple(null, null);
Control theControl = cont.getControl();
ArjunaTransactionImple tx = cont.getImplHandle();
ServerControl sc = new ServerControl(tx.get_uid(), theControl, tx, theControl.get_coordinator(), theControl.get_terminator());
ServerTopLevelAction act = new ServerTopLevelAction(sc);
assertEquals(act.prepare(), Vote.VoteReadOnly);
try {
act.rollback();
fail();
} catch (final INVALID_TRANSACTION ex) {
}
act.forget();
}
Aggregations