divijvaidya commented on code in PR #13944: URL: https://github.com/apache/kafka/pull/13944#discussion_r1263465710
########## core/src/test/java/kafka/log/remote/RemoteLogReaderTest.java: ########## @@ -61,15 +74,20 @@ public void testRemoteLogReaderWithoutError() throws RemoteStorageException, IOE assertFalse(actualRemoteLogReadResult.error.isPresent()); assertTrue(actualRemoteLogReadResult.fetchDataInfo.isPresent()); assertEquals(fetchDataInfo, actualRemoteLogReadResult.fetchDataInfo.get()); + + // Verify metrics for remote reads are updated correctly + assertEquals(1, brokerTopicStats.topicStats(TOPIC).remoteReadRequestRate().count()); + assertEquals(100, brokerTopicStats.topicStats(TOPIC).remoteBytesInRate().count()); + assertEquals(0, brokerTopicStats.topicStats(TOPIC).failedRemoteReadRequestRate().count()); } @Test public void testRemoteLogReaderWithError() throws RemoteStorageException, IOException { - when(mockRLM.read(any(RemoteStorageFetchInfo.class))).thenThrow(new OffsetOutOfRangeException("error")); + when(mockRLM.read(any(RemoteStorageFetchInfo.class))).thenThrow(new RuntimeException("error")); Review Comment: ok -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org