abstractdog commented on code in PR #6729:
URL: https://github.com/apache/hive/pull/6729#discussion_r3892530117


##########
ql/src/test/org/apache/hadoop/hive/ql/exec/tez/monitoring/yarnqueue/TestYarnQueueMetricsCollector.java:
##########
@@ -107,11 +107,24 @@ private void waitForInvocationCount(Object mock, int 
minCount, long timeoutMs) {
     }
   }
 
+  /**
+   * Awaits the first refresh poll and asserts it happened. Use before 
shutting down a
+   * collector whose per-test stubs are consumed only by the refresh thread.
+   */
+  private void awaitFirstPoll() {
+    waitForInvocationCount(mockYarnClient, 1, WAIT_TIMEOUT_MS);
+    assertTrue("Refresh task should have polled YARN",
+        mockingDetails(mockYarnClient).getInvocations().size() >= 1);
+  }
+
   /**
    * Configures mock objects with standard happy-path values.
    * Called from {@code @Before} so all tests start with a consistent baseline.
    * Stubs are lenient so tests that don't exercise these mocks don't fail with
    * UnnecessaryStubbingException.

Review Comment:
   "Stubs are lenient so tests that don't exercise these mocks don't fail with 
UnnecessaryStubbingException." can you confirm is this was true at all?



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