Package org.eclipse.microprofile.lra.tck
Class TckRecoveryTests
java.lang.Object
org.eclipse.microprofile.lra.tck.TckRecoveryTests
Tests for the recovery of failed LRA services. Test that LRA functions properly even in case of service failures.
This test is meant to be run in "run as client mode controlling the behaviour not via CDI injection but via HTTP
calls. The @Deployment is defined as managed = false which means that Arquillian does not
automatically deploy the deployment at the start of the test and the test control this step on its own.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()voidbefore()static org.jboss.shrinkwrap.api.spec.WebArchivedeploy()voidtestCancelWhenParticipantIsRestarted(URL deploymentURL) This test verifies that if the microservice application fails after it enlists with a LRA and then it is restarted again the Compensate callbacks are still received correctly.voidtestCancelWhenParticipantIsUnavailable(URL deploymentURL) This test verifies that if the microservice application which enlisted with the LRA fails and the LRA is ended during the time the service is still down, the Compensate callbacks are received when the microservice application is started again.
-
Field Details
-
testName
public org.junit.rules.TestName testName
-
-
Constructor Details
-
TckRecoveryTests
public TckRecoveryTests()
-
-
Method Details
-
before
public void before() -
after
public void after() -
deploy
@Deployment(name="tck-recovery", managed=false) public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testCancelWhenParticipantIsRestarted
This test verifies that if the microservice application fails after it enlists with a LRA and then it is restarted again the Compensate callbacks are still received correctly. Scenario: - start a new container with a single LRA resource - start a new LRA and enlist LRA resource - kill the container/application - start the container/application = cancel the LRA and verify that the callbacks have been sent- Parameters:
deploymentURL- the URL of the arquillian deployment
-