chia7712 commented on a change in pull request #8853:
URL: https://github.com/apache/kafka/pull/8853#discussion_r441614873



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
##########
@@ -560,10 +529,15 @@ 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 = 
Math.max(0, topicMetadata.fetchesRemainingUntilVisible - 1);
+                    else return new 
Config(topicMetadata.configs.entrySet().stream()
+                                .map(entry -> new ConfigEntry(entry.getKey(), 
entry.getValue()))
+                                .collect(Collectors.toList()));

Review comment:
       It has been merged when I notice your comment. Let me address it in 
another PR :)
   
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to