XComp commented on a change in pull request #15039:
URL: https://github.com/apache/flink/pull/15039#discussion_r584315609



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/util/MetricUtilsTest.java
##########
@@ -161,7 +222,7 @@ public void testHeapMetricUsageNotStatic() throws Exception 
{
     }
 
     @Test
-    public void testMetaspaceMetricUsageNotStatic() throws 
InterruptedException {
+    public void testMetaspaceMetricUsageNotStatic() throws Exception {

Review comment:
       That would be an option as well. The advantage of adding a utility 
method to the test itself to check whether the `Metaspace` pool is set is that 
it's more explicit. Additionally, we're mixing the code we want to test with 
the trigger that enables the test in your proposal. Here's where I see a 
problem as we might disable the test accidentally by just applying some changes 
to the `instantiateMetaspaceMemoryMetrics`.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to