mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
[SEARCH-1309] solr home proper set up for distributed tests
This commit is contained in:
@@ -66,7 +66,6 @@ public class CoresCreateUpdateDistributedTest extends AbstractAlfrescoDistribute
|
||||
private void destroyData() throws Throwable
|
||||
{
|
||||
dismissSolrServers();
|
||||
System.clearProperty("solr.solr.home");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,11 +99,6 @@ public class CoresCreateUpdateDistributedTest extends AbstractAlfrescoDistribute
|
||||
assertNotNull(coreAdminHandler);
|
||||
String coreName = "alfSharedCore";
|
||||
|
||||
//AlfrescoSolrDataModel.getResourceDirectory() looks for solrhome in a system property or jndi.
|
||||
//In production there's always a solr.home but not in this test, so this is the workaround.
|
||||
//Set it here and clean up with a @AfterClass method.
|
||||
System.setProperty("solr.solr.home", coreContainer.getSolrHome());
|
||||
|
||||
//First, we have no cores so we can update the shared properties, including disallowed
|
||||
updateShared(coreAdminHandler,"property.solr.host", "myhost", "property.my.property", "chocolate",
|
||||
"property.alfresco.identifier.property.0", "http://www.alfresco.org/model/content/1.0}userName");
|
||||
|
@@ -196,12 +196,14 @@ public abstract class SolrTestInitializer extends SolrTestCaseJ4
|
||||
System.setProperty("solr.test.sys.prop2", "proptwo");
|
||||
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockDirectoryFactory");
|
||||
System.setProperty("solr.log.dir", testDir.toPath().resolve(serverName).toString());
|
||||
System.setProperty("solr.solr.home", testDir.toPath().resolve(serverName).toString());
|
||||
}
|
||||
|
||||
public static void distribTearDown() throws Exception
|
||||
{
|
||||
System.clearProperty("solr.directoryFactory");
|
||||
System.clearProperty("solr.log.dir");
|
||||
System.clearProperty("solr.solr.home");
|
||||
|
||||
SOLRAPIQueueClient.nodeMetaDataMap.clear();
|
||||
SOLRAPIQueueClient.transactionQueue.clear();
|
||||
|
Reference in New Issue
Block a user