pgaref commented on a change in pull request #1277:
URL: https://github.com/apache/hive/pull/1277#discussion_r458061768



##########
File path: 
service/src/test/org/apache/hadoop/util/ShutdownHookManagerInspector.java
##########
@@ -20,9 +20,20 @@
 
 import java.util.List;
 
+import static org.junit.Assert.assertEquals;
+
 public class ShutdownHookManagerInspector {
 
-  public static List<ShutdownHookManager.HookEntry> getShutdownHooksInOrder() {
-    return ShutdownHookManager.get().getShutdownHooksInOrder();
+  public static int getShutdownHookCount() {
+    return ShutdownHookManager.get().getShutdownHooksInOrder().size();
+  }
+
+  public static void assertShutdownHookCount(int expected) {
+    List<ShutdownHookManager.HookEntry> entries = 
ShutdownHookManager.get().getShutdownHooksInOrder();
+    StringBuilder errorBuilder = new StringBuilder("Shutdown hooks:\n");
+    for (ShutdownHookManager.HookEntry entry: entries) {

Review comment:
       nit: space before col




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

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