kfaraz commented on code in PR #18207:
URL: https://github.com/apache/druid/pull/18207#discussion_r2199327879
##########
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:
Yeah, that's a fair point.
I think I started out with this so that the client side didn't need to add a
bunch of modules to the ObjectMapper.
I remember something had failed due to the absence of some types.
However, since we are using the `HttpClient` and `ObjectMapper` from one of
the servers itself, I can't recall why it had failed exactly.
Let me try using some of the existing builders.
Could you point me to the builder (if one exists) for a general `IndexTask`
and `ParallelIndexSupervisorTask`?
If one doesn't exist, I will just try to convert the new builder in this PR
to suit that purpose.
--
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]