You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/04/27 08:34:14 UTC

[GitHub] [kafka] tombentley commented on a change in pull request #8311: KAFKA-9434: automated protocol for alterReplicaLogDirs

tombentley commented on a change in pull request #8311:
URL: https://github.com/apache/kafka/pull/8311#discussion_r415618607



##########
File path: clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java
##########
@@ -3382,6 +3388,70 @@ public void testAlterClientQuotas() throws Exception {
         }
     }
 
+    @Test
+    public void testAlterReplicaLogDirsSuccess() throws Exception {
+        try (AdminClientUnitTestEnv env = mockClientEnv()) {
+            createAlterLogDirsResponse(env, env.cluster().nodeById(0), Errors.NONE, 0);
+            createAlterLogDirsResponse(env, env.cluster().nodeById(1), Errors.NONE, 0);
+
+            TopicPartitionReplica tpr0 = new TopicPartitionReplica("topic", 0, 0);
+            TopicPartitionReplica tpr1 = new TopicPartitionReplica("topic", 0, 1);
+
+            Map<TopicPartitionReplica, String> logDirs = new HashMap<>();
+            assertNull(logDirs.put(tpr0, "/data0"));
+            assertNull(logDirs.put(tpr1, "/data1"));

Review comment:
       Good catch! Sorry about that.




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

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