Skip to content

Commit

Permalink
Using LRAClient get status in tck instead of management spi status
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Chaloupka <[email protected]>
  • Loading branch information
ochaloup committed Feb 6, 2019
1 parent 020738a commit 8d8efff
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private void getRecoveringLRAs() throws WebApplicationException {
private String isActiveLRA() throws WebApplicationException {
URL lra = lraClient.startLRA(null, "SpecTest#isActiveLRA", LRA_TIMEOUT_MILLIS, ChronoUnit.MILLIS);

assertTrue(lraSPI.getStatus(lra).isActive(), null, null, lra);
assertTrue(lraClient.getStatus(lra) == LRAStatus.Active, null, null, lra);

lraClient.closeLRA(lra);

Expand All @@ -261,7 +261,7 @@ private String isCompensatedLRA() throws WebApplicationException {

lraClient.cancelLRA(lra);

assertTrue(lraSPI.getStatus(lra).isCompensated(), null, null, lra);
assertTrue(lraClient.getStatus(lra) == LRAStatus.Cancelled, null, null, lra);

return lra.toExternalForm();
}
Expand All @@ -273,7 +273,7 @@ private String isCompletedLRA() throws WebApplicationException {

lraClient.closeLRA(lra);

assertTrue(lraSPI.getStatus(lra).isComplete(), null, null, lra);
assertTrue(lraClient.getStatus(lra) == LRAStatus.Closed, null, null, lra);

return lra.toExternalForm();
}
Expand Down Expand Up @@ -864,7 +864,7 @@ private void cancelCheck(String path) {
assertEquals(cnt1[1] + 1, cnt2[1], "compensate should have been called", resourcePath);

try {
assertTrue(!lraSPI.getStatus(lra).isActive(), "cancelCheck: LRA should have been cancelled", resourcePath, lra);
assertTrue(lraClient.getStatus(lra) != LRAStatus.Active, "cancelCheck: LRA should have been cancelled", resourcePath, lra);
} catch (NotFoundException ignore) {
// means the LRA has gone
}
Expand Down

0 comments on commit 8d8efff

Please sign in to comment.