lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thelabd...@apache.org
Subject svn commit: r1635969 [2/2] - in /lucene/dev/branches/branch_5x: ./ dev-tools/ dev-tools/idea/.idea/libraries/ dev-tools/scripts/ solr/ solr/bin/ solr/core/ solr/core/src/java/org/apache/solr/util/ solr/core/src/test/org/apache/solr/cloud/ solr/core/src...
Date Sat, 01 Nov 2014 15:21:34 GMT
Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/SolrSchemalessExampleTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/SolrSchemalessExampleTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/SolrSchemalessExampleTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/SolrSchemalessExampleTest.java
Sat Nov  1 15:21:32 2014
@@ -33,6 +33,10 @@ import org.slf4j.LoggerFactory;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.OutputStreamWriter;
+import java.util.Properties;
 
 public class SolrSchemalessExampleTest extends SolrExampleTestsBase {
   private static Logger log = LoggerFactory.getLogger(SolrSchemalessExampleTest.class);
@@ -42,8 +46,24 @@ public class SolrSchemalessExampleTest e
     File tempSolrHome = createTempDir().toFile();
     // Schemaless renames schema.xml -> schema.xml.bak, and creates + modifies conf/managed-schema,
     // which violates the test security manager's rules, which disallow writes outside the
build dir,
-    // so we copy the example/example-schemaless/solr/ directory to a new temp dir where
writes are allowed. 
-    FileUtils.copyDirectory(new File(ExternalPaths.EXAMPLE_SCHEMALESS_HOME), tempSolrHome);
+    // so we copy the example/example-schemaless/solr/ directory to a new temp dir where
writes are allowed.
+    FileUtils.copyFileToDirectory(new File(ExternalPaths.SERVER_HOME, "solr.xml"), tempSolrHome);
+    File collection1Dir = new File(tempSolrHome, "collection1");
+    FileUtils.forceMkdir(collection1Dir);
+    FileUtils.copyDirectoryToDirectory(new File(ExternalPaths.SCHEMALESS_CONFIGSET), collection1Dir);
+    Properties props = new Properties();
+    props.setProperty("name","collection1");
+    OutputStreamWriter writer = null;
+    try {
+      writer = new OutputStreamWriter(FileUtils.openOutputStream(new File(collection1Dir,
"core.properties")), "UTF-8");
+      props.store(writer, null);
+    } finally {
+      if (writer != null) {
+        try {
+          writer.close();
+        } catch (Exception ignore){}
+      }
+    }
     createJetty(tempSolrHome.getAbsolutePath(), null, null);
   }
   @Test

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java
Sat Nov  1 15:21:32 2014
@@ -42,7 +42,7 @@ public class TestBatchUpdate extends Sol
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 
   static final int numdocs = 1000;  

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java
Sat Nov  1 15:21:32 2014
@@ -24,6 +24,7 @@ import java.util.Random;
 import org.apache.commons.io.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrJettyTestBase;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.util.ExternalPaths;
 import org.eclipse.jetty.server.Connector;
@@ -56,7 +57,7 @@ public class JettyWebappTest extends Sol
   public void setUp() throws Exception 
   {
     super.setUp();
-    System.setProperty("solr.solr.home", ExternalPaths.EXAMPLE_HOME);
+    System.setProperty("solr.solr.home", SolrJettyTestBase.legacyExampleCollection1SolrHome());
     System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
 
     File dataDir = createTempDir().toFile();

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java
Sat Nov  1 15:21:32 2014
@@ -27,6 +27,6 @@ import org.junit.BeforeClass;
 public class LargeVolumeBinaryJettyTest extends LargeVolumeTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java
Sat Nov  1 15:21:32 2014
@@ -24,7 +24,6 @@ import org.junit.BeforeClass;
 public class LargeVolumeEmbeddedTest extends LargeVolumeTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    initCore(ExternalPaths.EXAMPLE_CONFIG, ExternalPaths.EXAMPLE_SCHEMA,
-        ExternalPaths.EXAMPLE_HOME);
+    initCore();
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java
Sat Nov  1 15:21:32 2014
@@ -24,6 +24,6 @@ import org.junit.BeforeClass;
 public class LargeVolumeJettyTest extends LargeVolumeTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java
Sat Nov  1 15:21:32 2014
@@ -31,6 +31,6 @@ public class SolrExampleEmbeddedTest ext
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    initCore(ExternalPaths.EXAMPLE_CONFIG, ExternalPaths.EXAMPLE_SCHEMA, ExternalPaths.EXAMPLE_HOME);
+    initCore();
   }
 }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
Sat Nov  1 15:21:32 2014
@@ -18,8 +18,11 @@
 package org.apache.solr.client.solrj.embedded;
 
 import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.util.Map;
 
+import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
@@ -47,7 +50,7 @@ public class SolrExampleJettyTest extend
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 
   @Test

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java
Sat Nov  1 15:21:32 2014
@@ -47,7 +47,7 @@ public class SolrExampleStreamingTest ex
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 
   @Override

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java
Sat Nov  1 15:21:32 2014
@@ -151,7 +151,7 @@ public class BasicHttpSolrServerTest ext
   
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
     jetty.getDispatchFilter().getServletHandler()
         .addServletWithMapping(RedirectServlet.class, "/redirect/*");
     jetty.getDispatchFilter().getServletHandler()

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServerTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServerTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServerTest.java
Sat Nov  1 15:21:32 2014
@@ -125,7 +125,7 @@ public class ConcurrentUpdateSolrServerT
   
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
     jetty.getDispatchFilter().getServletHandler()
         .addServletWithMapping(TestServlet.class, "/cuss/*");
   }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ExternalHttpClientTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ExternalHttpClientTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ExternalHttpClientTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ExternalHttpClientTest.java
Sat Nov  1 15:21:32 2014
@@ -34,7 +34,7 @@ import org.junit.Test;
 public class ExternalHttpClientTest extends SolrJettyTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
     jetty.getDispatchFilter().getServletHandler()
         .addServletWithMapping(BasicHttpSolrServerTest.SlowServlet.class, "/slow/*");
   }

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/NoOpResponseParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/NoOpResponseParserTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/NoOpResponseParserTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/NoOpResponseParserTest.java
Sat Nov  1 15:21:32 2014
@@ -57,7 +57,7 @@ public class NoOpResponseParserTest exte
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty(ExternalPaths.EXAMPLE_HOME, null, null);
+    createJetty(legacyExampleCollection1SolrHome(), null, null);
   }
 
   @Before

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java
Sat Nov  1 15:21:32 2014
@@ -36,7 +36,7 @@ public class TermsResponseTest extends S
 
   @BeforeClass
   public static void beforeTest() throws Exception {
-    initCore(ExternalPaths.EXAMPLE_CONFIG, ExternalPaths.EXAMPLE_SCHEMA, ExternalPaths.EXAMPLE_HOME);
+    initCore();
   }
   
   @Before

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
(original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java
Sat Nov  1 15:21:32 2014
@@ -40,9 +40,7 @@ import java.util.List;
 public class TestSpellCheckResponse extends SolrJettyTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    // createJetty(EXAMPLE_HOME, null, null);
-    initCore(ExternalPaths.EXAMPLE_CONFIG, ExternalPaths.EXAMPLE_SCHEMA, ExternalPaths.EXAMPLE_HOME);
-    // initCore("solrconfig.xml", "schema.xml", null);
+    initCore();
   }
   
   static String field = "name";

Modified: lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
(original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
Sat Nov  1 15:21:32 2014
@@ -18,13 +18,19 @@ package org.apache.solr;
  */
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.OutputStreamWriter;
+import java.util.Properties;
 import java.util.SortedMap;
 
 import org.apache.commons.io.FileUtils;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
+import org.apache.solr.util.ExternalPaths;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -132,5 +138,51 @@ abstract public class SolrJettyTestBase 
     }
   }
 
+  public static void initCore() throws Exception {
+    String exampleHome = legacyExampleCollection1SolrHome();
+    String exampleConfig = exampleHome+"/collection1/conf/solrconfig.xml";
+    String exampleSchema = exampleHome+"/collection1/conf/schema.xml";
+    initCore(exampleConfig, exampleSchema, exampleHome);
+  }
+
+  public static String legacyExampleCollection1SolrHome() {
+    String sourceHome = ExternalPaths.SOURCE_HOME;
+    if (sourceHome == null)
+      throw new IllegalStateException("No source home! Cannot create the legacy example solr
home directory.");
+
+    String legacyExampleSolrHome = null;
+    try {
+      File tempSolrHome = LuceneTestCase.createTempDir().toFile();
+      org.apache.commons.io.FileUtils.copyFileToDirectory(new File(sourceHome, "server/solr/solr.xml"),
tempSolrHome);
+      File collection1Dir = new File(tempSolrHome, "collection1");
+      org.apache.commons.io.FileUtils.forceMkdir(collection1Dir);
+
+      File configSetDir = new File(sourceHome, "server/solr/configsets/sample_techproducts_configs/conf");
+      org.apache.commons.io.FileUtils.copyDirectoryToDirectory(configSetDir, collection1Dir);
+      Properties props = new Properties();
+      props.setProperty("name", "collection1");
+      OutputStreamWriter writer = null;
+      try {
+        writer = new OutputStreamWriter(FileUtils.openOutputStream(new File(collection1Dir,
"core.properties")), "UTF-8");
+        props.store(writer, null);
+      } finally {
+        if (writer != null) {
+          try {
+            writer.close();
+          } catch (Exception ignore){}
+        }
+      }
+      legacyExampleSolrHome = tempSolrHome.getAbsolutePath();
+    } catch (Exception exc) {
+      if (exc instanceof RuntimeException) {
+        throw (RuntimeException)exc;
+      } else {
+        throw new RuntimeException(exc);
+      }
+    }
+
+    return legacyExampleSolrHome;
+  }
+
 
 }

Modified: lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java
(original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java
Sat Nov  1 15:21:32 2014
@@ -18,6 +18,11 @@ package org.apache.solr.util;
  */
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Properties;
+
+import org.apache.commons.io.*;
+import org.apache.lucene.util.LuceneTestCase;
 
 /**
  * Some tests need to reach outside the classpath to get certain resources (e.g. the example
configuration).
@@ -37,20 +42,20 @@ public class ExternalPaths {
    * home, and if it is null, those paths will just be relative to 'null' and may not be

    * meaningful.
    */
-  private static final String SOURCE_HOME = determineSourceHome();
+  public static final String SOURCE_HOME = determineSourceHome();
   /* @see #SOURCE_HOME */
   public static String WEBAPP_HOME = new File(SOURCE_HOME, "webapp/web").getAbsolutePath();
   /* @see #SOURCE_HOME */
-  public static String EXAMPLE_HOME = new File(SOURCE_HOME, "example/solr").getAbsolutePath();
-  /* @see #SOURCE_HOME */
-  public static String EXAMPLE_SCHEMALESS_HOME = new File(SOURCE_HOME, "example/example-schemaless/solr").getAbsolutePath();
+  public static String SCHEMALESS_CONFIGSET =
+      new File(SOURCE_HOME, "server/solr/configsets/data_driven_schema_configs/conf").getAbsolutePath();
+  public static String TECHPRODUCTS_CONFIGSET =
+      new File(SOURCE_HOME, "server/solr/configsets/sample_techproducts_configs/conf").getAbsolutePath();
+
   /* @see #SOURCE_HOME */
   public static String EXAMPLE_MULTICORE_HOME = new File(SOURCE_HOME, "example/multicore").getAbsolutePath();
-  /* @see #SOURCE_HOME */
-  public static String EXAMPLE_SCHEMA=EXAMPLE_HOME+"/collection1/conf/schema.xml";
-  /* @see #SOURCE_HOME */
-  public static String EXAMPLE_CONFIG=EXAMPLE_HOME+"/collection1/conf/solrconfig.xml";
-  
+
+  public static String SERVER_HOME = new File(SOURCE_HOME, "server/solr").getAbsolutePath();
+
   /**
    * Ugly, ugly hack to determine the example home without depending on the CWD
    * this is needed for example/multicore tests which reside outside the classpath.

Modified: lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java?rev=1635969&r1=1635968&r2=1635969&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
(original)
+++ lucene/dev/branches/branch_5x/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
Sat Nov  1 15:21:32 2014
@@ -38,8 +38,8 @@ import org.apache.solr.common.params.Sol
 import org.eclipse.jetty.util.security.CertificateUtils;
 
 public class SSLTestConfig extends SSLConfig {
-  public static File TEST_KEYSTORE = ExternalPaths.EXAMPLE_HOME == null ? null
-      : new File(ExternalPaths.EXAMPLE_HOME, "../etc/solrtest.keystore");
+  public static File TEST_KEYSTORE = ExternalPaths.SERVER_HOME == null ? null
+      : new File(ExternalPaths.SERVER_HOME, "../etc/solrtest.keystore");
   
   private static String TEST_KEYSTORE_PATH = TEST_KEYSTORE != null
       && TEST_KEYSTORE.exists() ? TEST_KEYSTORE.getAbsolutePath() : null;



Mime
View raw message