Project

General

Profile

« Previous | Next » 

Revision 4127

Added by daigle about 16 years ago

Replace Options class with PropertyService and create PropertyService using log directory name instead of servlet context

View differences:

HarvestSiteScheduleTest.java
31 31
import edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule;
32 32
import edu.ucsb.nceas.metacat.service.PropertyService;
33 33
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
34
import edu.ucsb.nceas.utilities.Options;
35 34

  
36 35
import java.io.File;
37 36
import java.util.Date;
......
50 49
  private Harvester harvester;
51 50
  private HarvestSiteSchedule harvestSiteScheduleFuture; // future date next har
52 51
  private HarvestSiteSchedule harvestSiteSchedulePast; // past date next harvest
53
  /* Initialize Options*/
52
  /* Initialize Properties*/
54 53
  static
55 54
  {
56 55
	  try
57 56
	  {
58
		  Options.initialize(new File("build/tests/metacat.properties"));
57
		  PropertyService.getInstance("build/tests");
59 58
		  MetaCatUtil.pathsForIndexing 
60 59
		         = MetaCatUtil.getOptionList(PropertyService.getProperty("indexPaths"));
61 60
	  }
......
98 97
    int updateFrequency = 1;
99 98

  
100 99
    harvester = new Harvester();
101
    Harvester.loadOptions(test);
100
    Harvester.loadProperties(test);
102 101
    harvester.getConnection();  // initializes the database connection
103 102
    harvester.initLogIDs();
104 103
    harvester.setHarvestStartTime(new Date());

Also available in: Unified diff