kfaraz commented on code in PR #18207:
URL: https://github.com/apache/druid/pull/18207#discussion_r2199386220


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/EmbeddedAutoCompactionTest.java:
##########
@@ -85,68 +90,177 @@
 import org.joda.time.Interval;
 import org.joda.time.Period;
 import org.joda.time.chrono.ISOChronology;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Guice;
-import org.testng.annotations.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.junit.jupiter.params.provider.ValueSource;
 
 import java.io.Closeable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashSet;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.UUID;
+import java.util.TreeSet;
+import java.util.function.Supplier;
 import java.util.stream.Collectors;
 
-@Test(groups = {TestNGGroup.COMPACTION})
-@Guice(moduleFactory = DruidTestModuleFactory.class)
-public class ITAutoCompactionTest extends AbstractIndexerTest
+/**
+ * Embedded mode of integration-tests originally present in {@code 
ITAutoCompactionTest}.
+ */
+public class EmbeddedAutoCompactionTest extends EmbeddedClusterTestBase
 {
-  private static final Logger LOG = new Logger(ITAutoCompactionTest.class);
-  private static final String INDEX_TASK = 
"/indexer/wikipedia_index_task.json";
-  private static final String INDEX_TASK_WITH_GRANULARITY_SPEC = 
"/indexer/wikipedia_index_task_with_granularity_spec.json";
-  private static final String INDEX_TASK_WITH_DIMENSION_SPEC = 
"/indexer/wikipedia_index_task_with_dimension_spec.json";
-  private static final String INDEX_ROLLUP_QUERIES_RESOURCE = 
"/indexer/wikipedia_index_rollup_queries.json";
-  private static final String INDEX_ROLLUP_SKETCH_QUERIES_RESOURCE = 
"/indexer/wikipedia_index_sketch_queries.json";
-  private static final String INDEX_QUERIES_RESOURCE = 
"/indexer/wikipedia_index_queries.json";
-  private static final String INDEX_TASK_WITH_ROLLUP_FOR_PRESERVE_METRICS = 
"/indexer/wikipedia_index_rollup_preserve_metric.json";
-  private static final String INDEX_TASK_WITHOUT_ROLLUP_FOR_PRESERVE_METRICS = 
"/indexer/wikipedia_index_no_rollup_preserve_metric.json";
+  private static final Logger LOG = new 
Logger(EmbeddedAutoCompactionTest.class);
+  private static final Supplier<TaskPayload> INDEX_TASK =
+      () -> TaskPayload

Review Comment:
   Hmm, let me write something up then.
   It would make sense to have a clean builder that can be used in other UTs 
too.
   
   I think this same builder can be repurposed to do that just by returning a 
concrete object rather than a map.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to