IgorBerman commented on code in PR #16266:
URL: https://github.com/apache/druid/pull/16266#discussion_r1573314849
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java:
##########
@@ -331,4 +332,9 @@ static TaskInfo<TaskIdentifier, TaskStatus>
toTaskIdentifierInfo(TaskInfo<Task,
taskInfo.getTask().getMetadata()
);
}
+
+ default LookupLoadingMode loadLookups()
Review Comment:
added
##########
services/src/test/java/org/apache/druid/cli/CliPeonTest.java:
##########
@@ -73,6 +76,35 @@ public void testCliPeonK8sANdWorkerIsK8sMode() throws
IOException
Assert.assertNotNull(runnable.makeInjector());
}
+ @Test
+ public void testResolveLookupModule() throws IOException
+ {
+ File file = temporaryFolder.newFile("task.json");
+ FileUtils.write(file, "{\"type\":\"noop\"}", StandardCharsets.UTF_8);
+ FakeCliPeon peon = new FakeCliPeon(file.getParent(), "k8sAndWorker");
+ Assert.assertTrue(peon.resolveLookupModule() instanceof LookupModule);
+ }
+
+ @Test
+ public void testResolveSerdeLookupModule() throws IOException
+ {
+ File file = temporaryFolder.newFile("task.json");
+ FileUtils.write(file, "{\"type\":\"noop\"}", StandardCharsets.UTF_8);
+ FakeCliPeon peon = new FakeCliPeon(file.getParent(), "k8sAndWorker");
+ peon.loadLookups = LookupLoadingMode.NONE;
+ Assert.assertTrue(peon.resolveLookupModule() instanceof LookupSerdeModule);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
Review Comment:
replaced with assertThrows
--
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]