This is an automated email from the ASF dual-hosted git repository.

sodonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 8521c05884 HDDS-8964. Create a separate endpoint for summary for 
various SCM Insights and OM Insights - addendum: fix compile error (#5185)
8521c05884 is described below

commit 8521c05884c0eb8c29d3fc1b3ec5f5dfd25ca3e1
Author: Zita Dombi <[email protected]>
AuthorDate: Mon Aug 14 14:07:53 2023 +0200

    HDDS-8964. Create a separate endpoint for summary for various SCM Insights 
and OM Insights - addendum: fix compile error (#5185)
---
 .../ozone/recon/api/TestOmDBInsightEndPoint.java   | 38 +++++++++++++---------
 1 file changed, 22 insertions(+), 16 deletions(-)

diff --git 
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOmDBInsightEndPoint.java
 
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOmDBInsightEndPoint.java
index b8398b9336..5695c752c6 100644
--- 
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOmDBInsightEndPoint.java
+++ 
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOmDBInsightEndPoint.java
@@ -231,15 +231,18 @@ public class TestOmDBInsightEndPoint extends 
AbstractReconSqlDBTest {
         "openFileTable" + "UnReplicatedDataSize", 50L);
 
     Response openKeyInfoResp =
-        omdbInsightEndpoint.getOpenKeyInfo(-1, "", true, true);
-    KeyInsightInfoResponse keyInsightInfoResp = (KeyInsightInfoResponse)
-        openKeyInfoResp.getEntity();
-    Assertions.assertNotNull(keyInsightInfoResp);
-    Map<String, Long> summary = keyInsightInfoResp.getKeysSummary();
+        omdbInsightEndpoint.getOpenKeySummary();
+    Assertions.assertNotNull(openKeyInfoResp);
+
+    Map<String, Long> openKeysSummary =
+        (Map<String, Long>) openKeyInfoResp.getEntity();
     // Assert that the key prefix format is accepted in the global stats
-    Assertions.assertEquals(6L, summary.get("totalOpenKeys"));
-    Assertions.assertEquals(300L, summary.get("totalReplicatedDataSize"));
-    Assertions.assertEquals(100L, summary.get("totalUnreplicatedDataSize"));
+    Assertions.assertEquals(6L,
+        openKeysSummary.get("totalOpenKeys"));
+    Assertions.assertEquals(300L,
+        openKeysSummary.get("totalReplicatedDataSize"));
+    Assertions.assertEquals(100L,
+        openKeysSummary.get("totalUnreplicatedDataSize"));
 
     // Delete the previous records and Update the new value for valid key 
prefix
     statsDao.deleteById("openKeyTable" + "Count",
@@ -256,15 +259,18 @@ public class TestOmDBInsightEndPoint extends 
AbstractReconSqlDBTest {
         3L);
 
     openKeyInfoResp =
-        omdbInsightEndpoint.getOpenKeyInfo(-1, "", true, true);
-    keyInsightInfoResp = (KeyInsightInfoResponse)
-        openKeyInfoResp.getEntity();
-    Assertions.assertNotNull(keyInsightInfoResp);
-    summary = keyInsightInfoResp.getKeysSummary();
+        omdbInsightEndpoint.getOpenKeySummary();
+    Assertions.assertNotNull(openKeyInfoResp);
+
+    openKeysSummary =
+        (Map<String, Long>) openKeyInfoResp.getEntity();
     // Assert that the key format is not accepted in the global stats
-    Assertions.assertEquals(0L, summary.get("totalOpenKeys"));
-    Assertions.assertEquals(0L, summary.get("totalReplicatedDataSize"));
-    Assertions.assertEquals(0L, summary.get("totalUnreplicatedDataSize"));
+    Assertions.assertEquals(0L,
+        openKeysSummary.get("totalOpenKeys"));
+    Assertions.assertEquals(0L,
+        openKeysSummary.get("totalReplicatedDataSize"));
+    Assertions.assertEquals(0L,
+        openKeysSummary.get("totalUnreplicatedDataSize"));
   }
 
   @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to