jtuglu1 commented on code in PR #18793:
URL: https://github.com/apache/druid/pull/18793#discussion_r2586965367


##########
services/src/test/java/org/apache/druid/cli/CliPeonTest.java:
##########
@@ -270,19 +254,23 @@ public void 
testTaskWithMonitorsAndMetricsSpecDoNotCauseCyclicDependency() throw
     verifyTaskHolder(peonInjector.getInstance(TaskHolder.class), 
compactionTask);
   }
 
-  private Injector makePeonInjector(Properties properties, Task task) throws 
IOException
+  private Injector makePeonInjector(File taskFile, Properties properties)
   {
-    File file = temporaryFolder.newFile("task.json");
-    FileUtils.write(file, mapper.writeValueAsString(task), 
StandardCharsets.UTF_8);
-
     final CliPeon peon = new CliPeon();
-    peon.taskAndStatusFile = ImmutableList.of(file.getParent(), "1");
+    peon.taskAndStatusFile = ImmutableList.of(taskFile.getParent(), "1");
 
     peon.configure(properties);
     peon.configure(properties, GuiceInjectors.makeStartupInjector());
     return peon.makeInjector(Set.of(NodeRole.PEON));
   }
 
+  private Injector makePeonInjector(Properties properties, Task task) throws 
IOException

Review Comment:
   nit: cleaner for fn definition
   ```java
   private Injector makePeonInjector(File taskFile, Properties properties)
   ```
   ```java
   private Injector makePeonInjector(Task task, Properties properties) throws 
IOException
   ```



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