BewareMyPower commented on code in PR #24658: URL: https://github.com/apache/pulsar/pull/24658#discussion_r2298080559
########## pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java: ########## @@ -3577,9 +3579,13 @@ private void clearTopicPoliciesCache() { Map<TopicName, TopicPolicies> globalPoliciesCache = WhiteboxImpl.getInternalState(topicPoliciesService, "globalPoliciesCache"); + Map<NamespaceName, CompletableFuture<SystemTopicClient.Reader<PulsarEvent>>> readerCaches = WhiteboxImpl + .getInternalState(topicPoliciesService, "readerCaches"); Review Comment: Don't use reflection, just expose the field's visibility for tests. I know existing code has used reflection as well, it's definitely a result of bad quality reviews, but please don't go far in a wrong way. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org