mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-19 07:53:08 +00:00
DS-3484: Refactoring builders and extended Browse by title test
This commit is contained in:
@@ -8,31 +8,23 @@
|
||||
package org.dspace.statistics;
|
||||
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.solr.MockSolrServer;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* Mock service that uses an embedded SOLR server for the statistics core
|
||||
*/
|
||||
public class MockSolrLoggerServiceImpl extends SolrLoggerServiceImpl implements InitializingBean, DisposableBean {
|
||||
|
||||
private MockSolrServer mockSolrServer;
|
||||
public class MockSolrLoggerServiceImpl extends SolrLoggerServiceImpl implements InitializingBean {
|
||||
|
||||
@Autowired(required = true)
|
||||
private ConfigurationService configurationService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
mockSolrServer = new MockSolrServer("statistics");
|
||||
solr = mockSolrServer.getSolrServer();
|
||||
//We don' use SOLR in the tests of this module
|
||||
solr = null;
|
||||
locationService = new MockLookupService();
|
||||
useProxies = configurationService.getBooleanProperty("useProxies");
|
||||
}
|
||||
|
||||
public void destroy() throws Exception {
|
||||
mockSolrServer.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user