tjiuming commented on a change in pull request #13833:
URL: https://github.com/apache/pulsar/pull/13833#discussion_r803337976



##########
File path: 
tiered-storage/file-system/src/test/java/org/apache/bookkeeper/mledger/offload/filesystem/impl/FileSystemManagedLedgerOffloaderTest.java
##########
@@ -111,6 +112,31 @@ public void testOffloadAndRead() throws Exception {
         }
     }
 
+    @Test
+    public void testOffloadAndReadMetrics() throws Exception {
+        LedgerOffloader offloader = fileSystemManagedLedgerOffloader;
+        UUID uuid = UUID.randomUUID();
+        offloader.offload(toWrite, uuid, map).get();
+
+        LedgerOffloaderMXBeanImpl mbean = 
(LedgerOffloaderMXBeanImpl)offloader.getStats();
+        assertTrue(mbean.getOffloadErrors(topic) == 0);
+        assertTrue(mbean.getOffloadBytes(topic) > 0 );
+        assertTrue(mbean.getReadLedgerLatencyBuckets(topic).getCount() > 0);
+        assertTrue(mbean.getWriteToStorageErrors(topic) == 0);
+
+        ReadHandle toTest = offloader.readOffloaded(toWrite.getId(), uuid, 
map).get();
+        LedgerEntries toTestEntries = toTest.read(0, numberOfEntries - 1);
+        Iterator<LedgerEntry> toTestIter = toTestEntries.iterator();
+        while(toTestIter.hasNext()) {
+            LedgerEntry toTestEntry = toTestIter.next();

Review comment:
       already updated




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


Reply via email to