org.eclipse.microprofile.lra.tck

## 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

### Field Summary

### Fields inherited from class org.eclipse.microprofile.lra.tck.TckTestBase

`testName`

### Constructor Summary

Constructors
Constructor and Description
`TckParticipantTests()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `cancelLraDuringBusinessMethod()`
`static org.jboss.shrinkwrap.api.spec.WebArchive` `deployValidParticipant()`
`void` `testNonJaxRsCompletionStageResponseAndParticipantStatus()` Test verifyies `CompletionStage` parametrized by `Response` and `ParticipantStatus` as valid non-JAX-RS participant methods return types
`void` `testNonJaxRsCompletionStageVoid()` Test verifies `CompletionStage` parametrized with `Void` as valid non-JAX-RS participant method return type
`void` `validSignaturesChainTest()` This test verifies chained call of non-JAX-RS participant methods.
`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

### Methods inherited from class org.eclipse.microprofile.lra.tck.TckTestBase

`after, before`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TckParticipantTests

    public TckParticipantTests()

### Method Detail

#### 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`