Package org.eclipse.microprofile.lra.tck
Class TckParticipantTests
java.lang.Object
org.eclipse.microprofile.lra.tck.TckTestBase
org.eclipse.microprofile.lra.tck.TckParticipantTests
TCK to verify that valid non-JAX-RS participant method signatures are respected
-
Field Summary
Fields inherited from class org.eclipse.microprofile.lra.tck.TckTestBase
testName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic org.jboss.shrinkwrap.api.spec.WebArchivevoidTest verifyiesCompletionStageparametrized byResponseandParticipantStatusas valid non-JAX-RS participant methods return typesvoidTest verifiesCompletionStageparametrized withVoidas valid non-JAX-RS participant method return typevoidThis test verifies chained call of non-JAX-RS participant methods.voidTest verifies that non-JAX-RS @Complete method is invoked according to the LRA protocol and that ifWebApplicationExceptionis thrown inside of a non-JAX-RS participant method thanResponseit is carrying is extracted and acted upon according to LRA response handlingMethods inherited from class org.eclipse.microprofile.lra.tck.TckTestBase
after, before
-
Constructor Details
-
TckParticipantTests
public TckParticipantTests()
-
-
Method Details
-
deployValidParticipant
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deployValidParticipant() -
validWebApplicationExceptionReturnedTest
public void validWebApplicationExceptionReturnedTest()Test verifies that non-JAX-RS @Complete method is invoked according to the LRA protocol and that ifWebApplicationExceptionis thrown inside of a non-JAX-RS participant method thanResponseit is carrying is extracted and acted upon according to LRA response handling -
validSignaturesChainTest
This test verifies chained call of non-JAX-RS participant methods. First it starts and cancels a new LRA. @Compensate non-JAX-RS method then returnsParticipantStatus.Compensating(seeValidLRAParticipant) indicating that non-JAX-RS @Status method should be invoked. The test then waits for recovery and then verifies that @Status method is called. This method finishes compensation with return of theResponseobject indicating failure and so the test then verifies that non-JAX-RS @Forget method has also been called.- Throws:
InterruptedException- When Test is interrupted during sleep.
-
testNonJaxRsCompletionStageVoid
Test verifiesCompletionStageparametrized withVoidas valid non-JAX-RS participant method return type- Throws:
InterruptedException- when waiting for the finishing the completion is interrupted
-
testNonJaxRsCompletionStageResponseAndParticipantStatus
Test verifyiesCompletionStageparametrized byResponseandParticipantStatusas valid non-JAX-RS participant methods return types- Throws:
InterruptedException- When Test is interrupted during sleep.
-
cancelLraDuringBusinessMethod
public void cancelLraDuringBusinessMethod() throws InterruptedException, ExecutionException, TimeoutException
-