You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "TaiJuWu (via GitHub)" <gi...@apache.org> on 2025/04/01 10:29:24 UTC
Re: [PR] KAFKA-18891: KIP-877 add support for RemoteLogMetadataManager and RemoteStorageManager [kafka]
TaiJuWu commented on code in PR #19286:
URL: https://github.com/apache/kafka/pull/19286#discussion_r2022583314
##########
core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java:
##########
@@ -413,24 +418,19 @@ void testRemoteLogMetadataManagerWithEndpointConfigOverridden() throws IOExcepti
tp -> Optional.of(mockLog),
(topicPartition, offset) -> { },
brokerTopicStats,
- metrics) {
+ metrics,
+ endPoint) {
+ @Override
public RemoteStorageManager createRemoteStorageManager() {
return remoteStorageManager;
}
+ @Override
public RemoteLogMetadataManager createRemoteLogMetadataManager() {
return remoteLogMetadataManager;
}
}) {
-
- String host = "localhost";
- int port = 1234;
- String securityProtocol = "PLAINTEXT";
- Endpoint endpoint = new Endpoint(securityProtocol, SecurityProtocol.PLAINTEXT, host, port);
- remoteLogManager.onEndPointCreated(endpoint);
- remoteLogManager.startup();
-
ArgumentCaptor<Map<String, Object>> capture = ArgumentCaptor.forClass(Map.class);
- verify(remoteLogMetadataManager, times(1)).configure(capture.capture());
+ verify(remoteLogMetadataManager, times(2)).configure(capture.capture());
Review Comment:
One is call from `setup`, the other is this function.
##########
core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java:
##########
@@ -776,17 +775,8 @@ void testFailedCopyShouldDeleteTheDanglingSegment() throws Exception {
assertEquals(1, brokerTopicStats.allTopicsStats().failedRemoteCopyRequestRate().count());
}
- @Test
- void testLeadershipChangesWithoutRemoteLogManagerConfiguring() {
Review Comment:
This test can be removed because configuration is called when creating.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org