Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-4038 CustomFailurePolicyTxTest.testPrepareFailure random failures #5344

Merged
merged 1 commit into from Aug 2, 2017

Conversation

pruivo
Copy link
Member

@pruivo pruivo commented Aug 2, 2017

@pruivo pruivo added this to the 9.1.1.Final milestone Aug 2, 2017
public void testPrepareFailure() {
failureInterceptor.enable();
try {
Exceptions.expectException(XAException.class, () -> cache("LON", 0).put("k", "v"));
Exceptions.expectException(CacheException.class, () -> cache("LON", 0).put("k", "v"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use Exceptions.expectException(CacheException.class, RollbackException.class, () -> cache("LON", 0).put("k", "v"));
I noticed the XAException is now a suppressed exception inside the RollbackException, but exploring the whole exception hierarchy might be overkill

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XaException are never seen by the user. they are only there for interaction between the TransactionManager and the XaResource/Synchronization.
I'll change to check for RollbackException

@tristantarrant
Copy link
Member

Good stuff. merged.

@pruivo pruivo deleted the t_4038 branch August 2, 2017 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants