mateczagany commented on code in PR #558:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/558#discussion_r1156268027


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/metrics/FlinkDeploymentMetricsTest.java:
##########
@@ -187,6 +193,66 @@ public void testMetricsMultiNamespace() {
         }
     }
 
+    @Test
+    public void testResourceMetrics() {
+        var namespace1 = "ns1";
+        var namespace2 = "ns2";
+        var deployment1 = TestUtils.buildApplicationCluster("deployment1", 
namespace1);
+        var deployment2 = TestUtils.buildApplicationCluster("deployment2", 
namespace1);
+        var deployment3 = TestUtils.buildApplicationCluster("deployment3", 
namespace2);
+
+        deployment1
+                .getStatus()
+                .getClusterInfo()
+                .putAll(
+                        Map.of(
+                                AbstractFlinkService.FIELD_NAME_TOTAL_CPU, "5",

Review Comment:
   I've added the tests, also added a check to convert `Infinity` and `NaN` 
values to 0 instead.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to