-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Remove redundant condition in test #12517
Remove redundant condition in test #12517
Conversation
CI hit #12300 |
@@ -2749,7 +2749,7 @@ public void testUpdateRowConcurrently() | |||
verifyConcurrentUpdateFailurePermissible(trinoException); | |||
} | |||
catch (Throwable verifyFailure) { | |||
if (trinoException != e && verifyFailure != e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me.
Only thing coming in my mind is that trinoException might be equal to e but that implies that the exception has a cycle/self-reference?
e.g.
catch (Exception e) {
RuntimeException trinoException = getTrinoExceptionCause(e);
e.addSuppressed(trinoException);
throw new TrinoException(..., e);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's possible & legit for e == trinoException
:
RuntimeException trinoException = getTrinoExceptionCause(e);
simply e
may be TrinoException
itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
No description provided.