clintropolis commented on code in PR #18228:
URL: https://github.com/apache/druid/pull/18228#discussion_r2197404316


##########
services/src/test/java/org/apache/druid/testing/embedded/EmbeddedDruidServer.java:
##########
@@ -66,6 +70,34 @@ public abstract class EmbeddedDruidServer<T extends 
EmbeddedDruidServer<T>> impl
         this.getClass().getSimpleName(),
         SERVER_ID.incrementAndGet()
     );
+    beforeStartHooks.add(
+        (cluster, self) -> {
+          // Add properties for temporary directories used by the servers
+          final String logsDirectory = 
cluster.getTestFolder().getOrCreateFolder("indexer-logs").getAbsolutePath();
+          final String taskDirectory = 
cluster.getTestFolder().newFolder().getAbsolutePath();
+          final String storageDirectory = 
cluster.getTestFolder().newFolder().getAbsolutePath();
+          log.info(
+              "Server[%s] using directories: task directory[%s], logs 
directory[%s], storage directory[%s].",
+              self.getName(),
+              taskDirectory,
+              logsDirectory,
+              storageDirectory
+          );
+          self.addProperty("druid.host", "localhost");

Review Comment:
   not currently, but i have had problems with stuff like this in the past so 
was proactively changing it. The problem i was running into was that some 
networks DNS services try to be "helpful" and redirect to a search page or the 
like, so what should be an unresolvable local network hostname ends up being a 
real address that is definitely not localhost when using 
`InetAddress.getLocalHost().getCanonicalHostName()`.



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