Search in sources :

Example 1 with DummyHeuristic

use of com.hp.mwtests.ts.arjuna.resources.DummyHeuristic in project narayana by jbosstm.

the class HeuristicNotificationUnitTest method test.

@Test
public void test() throws Exception {
    AtomicAction A = new AtomicAction();
    DummyHeuristic dh = new DummyHeuristic();
    A.begin();
    A.add(new BasicRecord());
    A.add(new BasicRecord());
    A.add(new HeuristicRecord());
    A.addSynchronization(dh);
    A.commit(false);
    assertEquals(TwoPhaseOutcome.HEURISTIC_MIXED, dh.getStatus());
}
Also used : AtomicAction(com.arjuna.ats.arjuna.AtomicAction) DummyHeuristic(com.hp.mwtests.ts.arjuna.resources.DummyHeuristic) BasicRecord(com.hp.mwtests.ts.arjuna.resources.BasicRecord) HeuristicRecord(com.hp.mwtests.ts.arjuna.resources.HeuristicRecord) Test(org.junit.Test)

Aggregations

AtomicAction (com.arjuna.ats.arjuna.AtomicAction)1 BasicRecord (com.hp.mwtests.ts.arjuna.resources.BasicRecord)1 DummyHeuristic (com.hp.mwtests.ts.arjuna.resources.DummyHeuristic)1 HeuristicRecord (com.hp.mwtests.ts.arjuna.resources.HeuristicRecord)1 Test (org.junit.Test)1