Skip to content

Commit

Permalink
Unitest must also load web-properties. Unittest only works if there
Browse files Browse the repository at this point in the history
happens to be a solrwaybackweb.properties in home.

added line to initialize webproperties.
  • Loading branch information
thomasegense committed Dec 28, 2023
1 parent 364981b commit 9f76a10
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import dk.kb.netarchivesuite.solrwayback.UnitTestUtils;
import dk.kb.netarchivesuite.solrwayback.facade.Facade;
import dk.kb.netarchivesuite.solrwayback.properties.PropertiesLoader;
import dk.kb.netarchivesuite.solrwayback.properties.PropertiesLoaderWeb;
import dk.kb.netarchivesuite.solrwayback.service.exception.InvalidArgumentServiceException;
import dk.kb.netarchivesuite.solrwayback.util.DateUtils;
import org.apache.commons.fileupload.util.Streams;
Expand Down Expand Up @@ -60,7 +61,8 @@ public static void setUp() throws Exception {
log.info("Setting up embedded server");

PropertiesLoader.initProperties(UnitTestUtils.getFile("properties/solrwayback_unittest.properties").getPath());

PropertiesLoaderWeb.initProperties(UnitTestUtils.getFile("properties/solrwaybackweb_unittest.properties").getPath());

// Embedded Solr 9.1+ must have absolute home both as env and explicit param
System.setProperty("solr.install.dir", Path.of(SOLR_HOME).toAbsolutePath().toString());
coreContainer = CoreContainer.createAndLoad(Path.of(SOLR_HOME).toAbsolutePath());
Expand Down

0 comments on commit 9f76a10

Please sign in to comment.