use of com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails in project narayana by jbosstm.
the class CompletionParticipantTest method testSendCommit.
@Test
public void testSendCommit() throws Exception {
final String messageId = "testSendCommit";
final MAP map = AddressingHelper.createRequestContext(TestUtil.completionCoordinatorServiceURI, messageId);
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("1");
final W3CEndpointReference endpoint = TestUtil.getCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
CompletionCoordinatorClient.getClient().sendCommit(endpoint, map, new InstanceIdentifier("sender"));
final CompletionCoordinatorDetails details = testCompletionCoordinatorProcessor.getCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasCommit());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
use of com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails in project narayana by jbosstm.
the class CompletionParticipantTest method testSendRollback.
@Test
public void testSendRollback() throws Exception {
final String messageId = "testSendRollback";
final MAP map = AddressingHelper.createRequestContext(TestUtil.completionCoordinatorServiceURI, messageId);
final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("2");
final W3CEndpointReference endpoint = TestUtil.getCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
CompletionCoordinatorClient.getClient().sendRollback(endpoint, map, new InstanceIdentifier("sender"));
final CompletionCoordinatorDetails details = testCompletionCoordinatorProcessor.getCompletionCoordinatorDetails(messageId, 10000);
assertTrue(details.hasRollback());
checkDetails(details, true, true, messageId, instanceIdentifier);
}
Aggregations