Search in sources :

Example 1 with TestParticipantDeserializer

use of org.jboss.narayana.rest.integration.test.common.TestParticipantDeserializer in project narayana by jbosstm.

the class RecoveryManagerTestCase method testRecoveryWithoutDeserializer.

@Test
public void testRecoveryWithoutDeserializer() {
    final String participantId = new Uid().toString();
    final LoggingParticipant loggingParticipantBefore = new LoggingParticipant(new Prepared());
    loggingParticipantBefore.commit();
    final ParticipantInformation participantInformationBefore = new ParticipantInformation(participantId, APPLICATION_ID + "1", "", loggingParticipantBefore, TxStatus.TransactionCommitted.name());
    ParticipantsContainer.getInstance().clear();
    ParticipantsManagerFactory.getInstance().setBaseUrl("");
    RecoveryManager.getInstance().persistParticipantInformation(participantInformationBefore);
    RecoveryManager.getInstance().registerDeserializer(APPLICATION_ID + "2", new TestParticipantDeserializer());
    final ParticipantInformation participantInformationAfter = ParticipantsContainer.getInstance().getParticipantInformation(participantId);
    Assert.assertNull(participantInformationAfter);
}
Also used : LoggingParticipant(org.jboss.narayana.rest.integration.test.common.LoggingParticipant) Uid(com.arjuna.ats.arjuna.common.Uid) Prepared(org.jboss.narayana.rest.integration.api.Prepared) ParticipantInformation(org.jboss.narayana.rest.integration.ParticipantInformation) TestParticipantDeserializer(org.jboss.narayana.rest.integration.test.common.TestParticipantDeserializer) Test(org.junit.Test)

Aggregations

Uid (com.arjuna.ats.arjuna.common.Uid)1 ParticipantInformation (org.jboss.narayana.rest.integration.ParticipantInformation)1 Prepared (org.jboss.narayana.rest.integration.api.Prepared)1 LoggingParticipant (org.jboss.narayana.rest.integration.test.common.LoggingParticipant)1 TestParticipantDeserializer (org.jboss.narayana.rest.integration.test.common.TestParticipantDeserializer)1 Test (org.junit.Test)1