use of com.arjuna.ats.arjuna.recovery.RecoveryDriver in project narayana by jbosstm.
the class RecoveryDriverUnitTest method testInvalid.
@Test
public void testInvalid() throws Exception {
RecoveryDriver rd = new RecoveryDriver(0, "foobar");
try {
rd.asynchronousScan();
fail();
} catch (final Exception ex) {
}
try {
rd.synchronousScan();
fail();
} catch (final Exception ex) {
}
}
use of com.arjuna.ats.arjuna.recovery.RecoveryDriver in project narayana by jbosstm.
the class RecoveryDriverUnitTest method testValid.
@Test
public void testValid() throws Exception {
recoveryPropertyManager.getRecoveryEnvironmentBean().setPeriodicRecoveryPeriod(1);
recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryBackoffPeriod(1);
RecoveryManager rm = RecoveryManager.manager();
rm.scan(null);
RecoveryDriver rd = new RecoveryDriver(RecoveryManager.getRecoveryManagerPort(), recoveryPropertyManager.getRecoveryEnvironmentBean().getRecoveryAddress(), 100000);
assertTrue(rd.asynchronousScan());
assertTrue(rd.synchronousScan());
}
Aggregations