Skip to content

Commit

Permalink
Merge pull request #93 from ochaloup/adjusting-tck-not-using-spi-status
Browse files Browse the repository at this point in the history
Using LRAClient get status in tck instead of management spi status
  • Loading branch information
mmusgrov authored Feb 8, 2019
2 parents 020738a + 8d8efff commit 9ee79d3
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 9ee79d3

Please sign in to comment.