nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091371793


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java:
##########
@@ -2194,7 +2332,10 @@ public void testRemovePublishRate() throws Exception {
     @Test
     public void testCheckMaxConsumers() throws Exception {
         Integer maxProducers = -1;
-        log.info("MaxConsumers: {} will set to the topic: {}", maxProducers, 
testTopic);
+        log.info()
+                .attr("maxconsumers", maxProducers)
+                .attr("willSetToTheTopic", testTopic)
+                .log("MaxConsumers: will set to the topic");

Review Comment:
   **Bug: `"maxconsumers"` attr key but value is the `maxProducers` variable — 
copy-paste mismatch. Also `"willSetToTheTopic"` is a sentence fragment, not an 
attr name.**
   
   ```suggestion
                   .log("MaxConsumers will be set to the topic");
   ```
   And change the attr key on the line above:
   - `attr("maxconsumers", maxProducers)` → `attr("maxConsumers", 
maxProducers)` (camelCase, and the value IS the maxConsumers limit being set)
   - `attr("willSetToTheTopic", testTopic)` → `attr("topic", testTopic)`
   
   This same pattern (`"willSetToTheTopic"`, `"willSetToTheNamespace"`) appears 
20+ times in this file and should all be simplified to `"topic"` / 
`"namespace"`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to