zhengchenyu commented on PR #4408:
URL: https://github.com/apache/hadoop/pull/4408#issuecomment-1151183063
> LambdaTestUtils.intercept is the way to test this; its our
reimplementation of ScalaTest intercept. if the exception class or message is
wrong, the exception is rethrown.
>
> which would you prefer in jenkins log. a message saying "an assert true
failed" or "here is the exception which was raised with all its stack"?
I will fix the code like
```
final ApplicationClientProtocol finalClientRMWithDT = clientRMWithDT;
final GetNewApplicationRequest finalRequest = request;
LambdaTestUtils.intercept(InvalidToken.class, "Token has expired",
() -> finalClientRMWithDT.getNewApplication(finalRequest));
```
Should I fix all code in this style? Because I found many code in
TestClientRMTokens need to fix in this way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]