dsmiley commented on code in PR #3321:
URL: https://github.com/apache/solr/pull/3321#discussion_r2040723746


##########
solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginIntegrationTest.java:
##########
@@ -105,8 +106,7 @@ public static void beforeClass() throws Exception {
     wrongPemFilePath = 
JWT_TEST_PATH().resolve("security").resolve("jwt_plugin_idp_wrongcert.pem");
 
     Path tempDir = 
Files.createTempDirectory(JWTAuthPluginIntegrationTest.class.getSimpleName());

Review Comment:
   can we call createTempDir instead?



##########
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java:
##########
@@ -205,7 +205,7 @@ private void setupBaseConfigSet(String baseConfigSetName, 
Map<String, String> ol
       throws Exception {
     final Path configDir = 
getFile("solr").resolve("configsets/configset-2/conf");
     final Path tmpConfigDir = createTempDir();
-    tmpConfigDir.toFile().deleteOnExit();
+    PathUtils.deleteOnExit(tmpConfigDir);

Review Comment:
   createTempDir self cleans up per test. It's javadocs say so.



##########
solr/modules/s3-repository/src/test/org/apache/solr/s3/S3BackupRepositoryTest.java:
##########


Review Comment:
   In this suite, can we just use createTempDir?



##########
solr/modules/llm/src/test/org/apache/solr/llm/TestLlmBase.java:
##########
@@ -60,9 +60,8 @@ protected static void setupTest(
   protected static void initFolders(boolean isPersistent) throws Exception {
     tmpSolrHome = createTempDir();
     tmpConfDir = tmpSolrHome.resolve(CONF_DIR);
-    tmpConfDir.toFile().deleteOnExit();
+    PathUtils.deleteOnExit(tmpConfDir);

Review Comment:
   createTempDir self cleans up per test. It's javadocs say so.



##########
solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IndexInputTest.java:
##########


Review Comment:
   same



##########
solr/modules/ltr/src/test/org/apache/solr/ltr/TestRerankBase.java:
##########
@@ -136,7 +136,7 @@ protected static void setupTestInit(String solrconfig, 
String schema, boolean is
       throws Exception {
     tmpSolrHome = createTempDir();
     tmpConfDir = tmpSolrHome.resolve(CONF_DIR);
-    tmpConfDir.toFile().deleteOnExit();
+    PathUtils.deleteOnExit(tmpConfDir);

Review Comment:
   createTempDir self cleans up per test. It's javadocs say so.



##########
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPIZkFailure.java:
##########
@@ -143,7 +143,7 @@ private void setupBaseConfigSet(String baseConfigSetName, 
Map<String, String> ol
       throws Exception {
     final Path configDir = 
getFile("solr").resolve("configsets/configset-2/conf");
     final Path tmpConfigDir = createTempDir();
-    tmpConfigDir.toFile().deleteOnExit();
+    PathUtils.deleteOnExit(tmpConfigDir);

Review Comment:
   createTempDir self cleans up per test.  It's javadocs say so.



##########
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java:
##########
@@ -1565,7 +1565,7 @@ public void testDeleteErrors() throws Exception {
     final SolrClient solrClient = getHttpSolrClient(baseUrl);
     final Path configDir = 
getFile("solr").resolve("configsets/configset-2/conf");
     final Path tmpConfigDir = createTempDir();
-    tmpConfigDir.toFile().deleteOnExit();
+    PathUtils.deleteOnExit(tmpConfigDir);

Review Comment:
   createTempDir self cleans up per test. It's javadocs say so.



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to