use of com.arjuna.ats.internal.jts.recovery.transactions.RecoveredTransactionReplayer in project narayana by jbosstm.
the class RecoveredTransactionReplayerUnitTest method testCommitted.
@Test
public void testCommitted() throws Exception {
/*
* Deliberately choose a Uid that doesn't represent a state
* on disk.
*
* Use un-threaded.
*/
Uid dummyUid = new Uid();
String dummyState = "/StateManager/DummyState";
RecoveredTransactionReplayer replayer = new RecoveredTransactionReplayer(dummyUid, dummyState);
DemoResource res = new DemoResource();
assertTrue(RecoveredTransactionReplayer.isPresent(dummyUid) != null);
replayer.swapResource(dummyUid, res.getResource());
replayer.run();
assertTrue(RecoveredTransactionReplayer.isPresent(dummyUid) == null);
}
Aggregations