lhotari commented on code in PR #25248:
URL: https://github.com/apache/pulsar/pull/25248#discussion_r2812386849


##########
pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java:
##########
@@ -748,6 +748,61 @@ public void testKeyLessMessagesPassThrough(boolean 
retainNullKey) throws Excepti
         }
     }
 
+    @Test(timeOut = 30000)
+    public void testNotToRetainNullValue() throws Exception {
+        conf.setTopicCompactionRetainNullValue(false);
+        conf.setTopicCompactionRetainNullKey(true);
+        restartBroker();
+        FieldUtils.writeField(compactor, "topicCompactionRetainNullValue", 
false, true);
+        FieldUtils.writeField(compactor, "topicCompactionRetainNullKey", true, 
true);

Review Comment:
   It would be better to override `restartBroker` in this class so that it 
reinitializes `compactor` so that there wouldn't be a need to set the fields 
directly.



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