joseluisll commented on code in PR #8893:
URL: https://github.com/apache/hadoop/pull/8893#discussion_r4480694934


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/TestLogAggregationService.java:
##########
@@ -1495,7 +1494,11 @@ void checkEvents(EventHandler<T> eventHandler,
         }
       }
     }
-    failures.ifExceptionThrow();
+    if (!failures.isEmpty()) {
+      AssertionError error = new AssertionError(failures.size() + " failures");

Review Comment:
   Done: `checkEvents` now throws `MultipleFailuresError("checkEvents", 
failures)` instead of building an `AssertionError`. `opentest4j` needed no pom 
change. With `getMessage()` checked against the real jar: one failure gives 
`checkEvents (1 failure)` plus its `java.lang.AssertionError: expected events`, 
so the single-failure message you were after is back, and several give every 
failure's message.
   
   `TestLogAggregationService` passes: `Tests run: 49, Failures: 0, Errors: 0, 
Skipped: 0`.



##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java:
##########
@@ -1960,9 +1960,7 @@ public void doFilter(ServletRequest request,
      */
     private String inferMimeType(ServletRequest request) {
       String path = ((HttpServletRequest)request).getRequestURI();
-      ServletContextHandler.Context sContext =
-          (ServletContextHandler.Context)config.getServletContext();
-      String mime = sContext.getMimeType(path);
+      String mime = config.getServletContext().getMimeType(path);
       return (mime == null) ? null : mime;

Review Comment:
   Done, it returns `config.getServletContext().getMimeType(path)` directly.



##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java:
##########
@@ -58,6 +59,9 @@
  * </p>
  */
 public abstract class FSMainOperationsBaseTest extends FileSystemTestHelper {
+  private static final Logger LOG =
+      LoggerFactory.getLogger(FSMainOperationsBaseTest.class);
+

Review Comment:
   Fixed in all six: `FSMainOperationsBaseTest`, `ViewFileSystemTestSetup`, 
`ViewFsTestSetup`, `TestAMRMClient`, `TestDockerCommandExecutor` and `MockNM` 
now have exactly one blank line after the logger; in the first three the line 
that survives is truly empty, no trailing spaces.



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

Reply via email to