camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [15/27] git commit: Different data dir per solr runner
Date Tue, 15 Jul 2014 11:40:09 GMT
Different data dir per solr runner


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/eeb434e5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/eeb434e5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/eeb434e5

Branch: refs/heads/master
Commit: eeb434e5062881ad1d48705b6e3098bd6bbbdbf2
Parents: b0c1a0e
Author: Doug Turnbull <dturnbull@o19s.com>
Authored: Mon Jun 16 22:06:09 2014 -0400
Committer: Doug Turnbull <dturnbull@o19s.com>
Committed: Mon Jun 16 22:06:09 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/camel/component/solr/JettySolrFactory.java  | 5 +++--
 .../test/java/org/apache/camel/component/solr/SolrFixtures.java | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/eeb434e5/components/camel-solr/src/test/java/org/apache/camel/component/solr/JettySolrFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/JettySolrFactory.java
b/components/camel-solr/src/test/java/org/apache/camel/component/solr/JettySolrFactory.java
index 5ec543d..b8aac40 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/JettySolrFactory.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/JettySolrFactory.java
@@ -28,6 +28,7 @@ public class JettySolrFactory {
 
 	public static File TEST_KEYSTORE = new File("./target/test-classes/solrtest.keystore");
 	private static boolean mockedSslClient = false;
+	private static int data_dir_no = 0;
 
 	private static String TEST_KEYSTORE_PATH = TEST_KEYSTORE.getAbsolutePath();
 	private static String TEST_KEYSTORE_PASSWORD = "secret";
@@ -84,7 +85,7 @@ public class JettySolrFactory {
 		// Set appropriate paths for Solr to use.
         System.setProperty("solr.solr.home", solrHome);
         System.setProperty("jetty.testMode", "true");
-        System.setProperty("solr.data.dir", "target/test-classes/solr/data");
+        System.setProperty("solr.data.dir", "target/test-classes/solr/data" + (data_dir_no++));
 
         // Instruct Solr to keep the index in memory, for faster testing.
         System.setProperty("solr.directoryFactory", "solr.RAMDirectoryFactory");
@@ -111,7 +112,7 @@ public class JettySolrFactory {
 		
 		if (!useSsl) {
 	        System.setProperty("tests.jettySsl", "false");
-		}
+		} 
 		
 		return createJetty(solrHome, configFile, schemaFile, context, stopAtShutdown, extraServlets,
useSsl);
 		

http://git-wip-us.apache.org/repos/asf/camel/blob/eeb434e5/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrFixtures.java
----------------------------------------------------------------------
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrFixtures.java
b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrFixtures.java
index 515f2c9..a72fd9c 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrFixtures.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrFixtures.java
@@ -48,6 +48,8 @@ public class SolrFixtures {
     	solrHttpsServer = new HttpSolrServer("https://localhost:" + httpsPort + "/solr");
         solrHttpsServer.setConnectionTimeout(60000);
         
+       // solrHttpsServer.deleteByQuery("*:*");
+        
     	solrRunner = JettySolrFactory.createJettyTestFixture(false);
     	port = solrRunner.getLocalPort();
     	
@@ -55,7 +57,7 @@ public class SolrFixtures {
     	
     	log.info("Started Test Server: " + solrRunner.getBaseUrl());
     	
-    	cloudFixture = new SolrCloudFixture("src/test/resources/solr");
+    	//cloudFixture = new SolrCloudFixture("src/test/resources/solr");
 
     }
     


Mime
View raw message