jubins commented on code in PR #28226:
URL: https://github.com/apache/flink/pull/28226#discussion_r3293892297
##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/application/ApplicationExceptionsHandlerTest.java:
##########
@@ -143,6 +159,43 @@ void testExceptionWithJobId() throws Exception {
assertThat(exceptionInfo.getJobId()).isEqualTo(jobId);
}
+ @Test
+ void testMaxExceptionsLimitsHistorySize() throws Exception {
Review Comment:
Good catch, they were both missing as explicit cases. Added two tests in
[ApplicationExceptionsHandlerTest.java](https://github.com/apache/flink/blob/master/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/application/ApplicationExceptionsHandlerTest.java):
1. `testDefaultCapAppliedWhenMaxExceptionsNotProvided`, exercises the
default-cap branch in handleRequest. It builds 25 history entries, omits
`maxExceptions` from the request, asserts the response is capped at
`MAX_NUMBER_EXCEPTION_TO_REPORT (20)`.
2. `testMaxExceptionsLargerThanHistorySizeReturnsAllEntries`, builds 3
history entries, requests maxExceptions=10, asserts the response contains all 3
entries (no padding, no overflow).
--
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]