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/06/11 22:18:47 UTC

[GitHub] [kafka] abbccdda commented on a change in pull request #8853: KAFKA-10147 MockAdminClient#describeConfigs(Collection
abbccdda commented on a change in pull request #8853:
URL: https://github.com/apache/kafka/pull/8853#discussion_r439101876



##########
File path: clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
##########
@@ -560,10 +529,14 @@ synchronized private Config getResourceDescription(ConfigResource resource) {
             }
             case TOPIC: {
                 TopicMetadata topicMetadata = allTopics.get(resource.name());
-                if (topicMetadata == null) {
-                    throw new UnknownTopicOrPartitionException();
+                if (topicMetadata != null && !topicMetadata.markedForDeletion) {
+                    if (topicMetadata.fetchesRemainingUntilVisible > 0) topicMetadata.fetchesRemainingUntilVisible--;

Review comment:
       nit: topicMetadata.fetchesRemainingUntilVisible = Math.max(0, topicMetadata.fetchesRemainingUntilVisible -1);

##########
File path: clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
##########
@@ -365,51 +366,6 @@ synchronized public DescribeTopicsResult describeTopics(Collection<String> topic
         return new DescribeTopicsResult(topicDescriptions);
     }
 
-    @Override
-    public DescribeConfigsResult describeConfigs(Collection<ConfigResource> resources) {

Review comment:
       Maybe just deprecate public method instead of removing it




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