Savonitar commented on code in PR #28226:
URL: https://github.com/apache/flink/pull/28226#discussion_r3292894755


##########
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:
   Could u please clarify, whether there are tests for:
   1. Default-cap path
   2. The case when maxException > historySize



##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/ApplicationExceptionsInfoWithHistory.java:
##########
@@ -91,10 +91,11 @@ public String toString() {
     }
 
     public static ApplicationExceptionsInfoWithHistory 
fromApplicationExceptionHistory(
-            Collection<ApplicationExceptionHistoryEntry> exceptions) {
+            Collection<ApplicationExceptionHistoryEntry> exceptions, int 
maxSize) {
         return new ApplicationExceptionsInfoWithHistory(
                 new ApplicationExceptionHistory(
                         exceptions.stream()
+                                .limit(maxSize)

Review Comment:
   Does that change the existing behavior (the return order)?



-- 
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]

Reply via email to