You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/05/31 20:29:38 UTC

[GitHub] [geode] pivotal-jbarrett commented on a diff in pull request #7730: GEODE-10305: Change locator and server dirs

pivotal-jbarrett commented on code in PR #7730:
URL: https://github.com/apache/geode/pull/7730#discussion_r886102240


##########
geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java:
##########
@@ -105,7 +108,10 @@ protected void startServer(String name, String classPath, int locatorPort) throw
   }
 
   protected void startLocator(String name, String classPath, int port) throws Exception {
-    locatorDir = tempFolder.newFolder("locator").getPath();
+    File locatorFile = new File("locator_dir_" + this.getClass().getSimpleName() + "_"
+        + testName.getMethodName().replace("[", "").replace("]", ""));

Review Comment:
   Isn't it possible for the test name to include invalid filesystem characters inside the `[]` part? It looks like the only params might be the version number right now but if someone adds another param to test this could change. Perhaps we should just hash the name or something?



##########
geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTestBase.java:
##########
@@ -105,7 +108,10 @@ protected void startServer(String name, String classPath, int locatorPort) throw
   }
 
   protected void startLocator(String name, String classPath, int port) throws Exception {
-    locatorDir = tempFolder.newFolder("locator").getPath();
+    File locatorFile = new File("locator_dir_" + this.getClass().getSimpleName() + "_"
+        + testName.getMethodName().replace("[", "").replace("]", ""));
+    locatorFile.mkdir();

Review Comment:
   What happens if `mkdir` fails?



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org