Class TckParticipantTests

java.lang.Object
org.eclipse.microprofile.lra.tck.TckTestBase
org.eclipse.microprofile.lra.tck.TckParticipantTests

public class TckParticipantTests extends TckTestBase
TCK to verify that valid non-JAX-RS participant method signatures are respected
  • 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 if WebApplicationException is thrown inside of a non-JAX-RS participant method than Response it is carrying is extracted and acted upon according to LRA response handling
    • validSignaturesChainTest

      public void validSignaturesChainTest() throws InterruptedException
      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 returns ParticipantStatus.Compensating (see ValidLRAParticipant) 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 the Response object 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

      public void testNonJaxRsCompletionStageVoid() throws InterruptedException
      Test verifies CompletionStage parametrized with Void as valid non-JAX-RS participant method return type
      Throws:
      InterruptedException - when waiting for the finishing the completion is interrupted
    • testNonJaxRsCompletionStageResponseAndParticipantStatus

      public void testNonJaxRsCompletionStageResponseAndParticipantStatus() throws InterruptedException
      Test verifyies CompletionStage parametrized by Response and ParticipantStatus as valid non-JAX-RS participant methods return types
      Throws:
      InterruptedException - When Test is interrupted during sleep.
    • cancelLraDuringBusinessMethod

      public void cancelLraDuringBusinessMethod() throws InterruptedException, ExecutionException, TimeoutException
      Throws:
      InterruptedException
      ExecutionException
      TimeoutException