You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/12/01 01:27:44 UTC

[GitHub] [solr] dsmiley commented on a diff in pull request #146: SOLR-15787: Implement FileSystemConfigSetService

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


##########
solr/core/src/test/org/apache/solr/core/TestFileSystemConfigSetService.java:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.core;
+
+import static org.apache.solr.core.FileSystemConfigSetService.METADATA_FILE;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.io.file.PathUtils;
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestFileSystemConfigSetService extends SolrTestCaseJ4 {
+  private static Path configSetBase;
+  private static FileSystemConfigSetService fileSystemConfigSetService;
+
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    configSetBase = createTempDir();
+    fileSystemConfigSetService = new FileSystemConfigSetService(configSetBase);
+  }
+
+  @AfterClass
+  public static void afterClass() throws Exception {
+    PathUtils.deleteDirectory(configSetBase);
+    fileSystemConfigSetService = null;
+  }
+
+  @Test
+  public void testUploadConfig() throws IOException {

Review Comment:
   That sounds like you were stopped by the Java security manager or OS.  If you change the path to someplace the test can write to then I think it will show the flaw



-- 
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-unsubscribe@solr.apache.org

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


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