divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1916346187


##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance 
cluster) throws Exception
     @ClusterTest(serverProperties = {
         @ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
         @ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
-        @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+        @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),

Review Comment:
   You can change it like this
   ```
   --- a/core/src/test/java/kafka/admin/DeleteTopicTest.java
   +++ b/core/src/test/java/kafka/admin/DeleteTopicTest.java
   @@ -57,6 +57,7 @@ import java.util.concurrent.ExecutionException;
    import java.util.function.Supplier;
    import java.util.stream.Collectors;
   
   +import scala.Option;
    import scala.jdk.javaapi.OptionConverters;
   
    import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
   @@ -239,7 +240,6 @@ public class DeleteTopicTest {
        @ClusterTest(serverProperties = {
            @ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
            @ClusterConfigProperty(key = "log.cleanup.policy", value = 
"compact"),
   -        @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
            @ClusterConfigProperty(key = "log.cleaner.dedupe.buffer.size", 
value = "1048577")
        })
        public void testDeleteTopicWithCleaner(ClusterInstance cluster) throws 
Exception {
   @@ -252,6 +252,8 @@ public class DeleteTopicTest {
                    "Replicas for topic test not created.");
                UnifiedLog log = server.logManager().getLog(topicPartition, 
false).get();
                writeDups(100, 3, log);
   +            // force roll the segment so that cleaner can work on it
   +            server.logManager().getLog(topicPartition, 
false).get().roll(Option.empty());
                // wait for cleaner to clean
                server.logManager().cleaner().awaitCleaned(topicPartition, 0, 
60000);
                admin.deleteTopics(List.of(DEFAULT_TOPIC)).all().get();
   ```
   
   and the test will pass



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to