use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerNestedStrictUnitTest 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());
ServerStrictNestedAction act = new ServerStrictNestedAction(sc, true);
act.rollback_subtransaction();
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerRecoveryTopLevelUnitTest method test.
@Test
public void test() 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());
DummyServerRecovery act = new DummyServerRecovery(sc);
act.destroyResource();
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerTopLevelActionUnitTest method testCommit.
@Test
public void testCommit() 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.commit();
fail();
} catch (final INVALID_TRANSACTION ex) {
}
assertTrue(act.getReference() != null);
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerTopLevelActionUnitTest method testCommitOnePhase.
@Test
public void testCommitOnePhase() 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);
act.commit_one_phase();
assertTrue(act.type() != null);
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple 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