public void setUp() throws Exception {
    super.setUp();
    tempDirPath = getTempDir().getAbsolutePath() + File.separator;

    theDaemon = getMockLockssDaemon();
    theDaemon.getAlertManager();
    theDaemon.getPluginManager().setLoadablePluginsReady(true);
    theDaemon.getHashService();
    MockSystemMetrics metrics = new MyMockSystemMetrics();
    metrics.initService(theDaemon);
    theDaemon.setSystemMetrics(metrics);

    theDaemon.setDaemonInited(true);

    Properties props = new Properties();
    props.setProperty(SystemMetrics.PARAM_HASH_TEST_DURATION, "1000");
    props.setProperty(SystemMetrics.PARAM_HASH_TEST_BYTE_STEP, "1024");
    props.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);
    ConfigurationUtil.setCurrentConfigFromProps(props);

    pluginMgr = theDaemon.getPluginManager();
    pluginMgr.startService();
    theDaemon.getHashService().startService();
    metrics.startService();
    metrics.setHashSpeed(100);

    simPlugin = PluginTestUtil.findPlugin(SimulatedPlugin.class);
  }
 public void setUp() throws Exception {
   super.setUp();
   theDaemon = getMockLockssDaemon();
   mgr = new MyRepositoryManager();
   theDaemon.setRepositoryManager(mgr);
   mgr.initService(theDaemon);
 }
Example #3
0
  public void setUp() throws Exception {
    super.setUp();
    daemon = getMockLockssDaemon();

    historyRepo = new MyMockHistoryRepository();
    mplug = new MockPlugin(daemon);
    mau = new MockArchivalUnit(mplug);
  }
 @Override
 public void setUp() throws Exception {
   super.setUp();
   setUpDiskSpace();
   theDaemon = getMockLockssDaemon();
   plugin = new DefinablePlugin();
   plugin.initPlugin(getMockLockssDaemon(), "org.lockss.plugin.highwire.HighWireDrupalPlugin");
 }
Example #5
0
 public void setUp() throws Exception {
   super.setUp();
   log.setLevel(Logger.LEVEL_DEBUG);
   if (dig == null) {
     dig = MessageDigest.getInstance(hashAlgorithm);
   }
   mau = new MockArchivalUnit(new MockPlugin());
   cus = new MockCachedUrlSet(mau, null);
   cus.setHashItSource(Collections.EMPTY_LIST);
   TimeBase.setSimulated();
 }
Example #6
0
  protected void setUp() throws Exception {
    super.setUp();
    TimeBase.setSimulated();

    initRequiredServices();

    testau.setPlugin(new MockPlugin());

    initTestPeerIDs();
    initTestMsg();
    initTestPolls();
  }
  public void setUp() throws Exception {
    super.setUp();
    String tempDirPath = getTempDir().getAbsolutePath() + File.separator;
    ConfigurationUtil.setFromArgs(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);
    theDaemon = getMockLockssDaemon();
    theDaemon.getAlertManager();
    theDaemon.getPluginManager().setLoadablePluginsReady(true);
    theDaemon.setDaemonInited(true);
    theDaemon.getPluginManager().startService();
    theDaemon.getCrawlManager();

    sau = PluginTestUtil.createAndStartSimAu(simAuConfig(tempDirPath));
    nau = PluginTestUtil.createAndStartAu(PLUGIN_NAME, natureAuConfig());
  }
  public void setUp() throws Exception {
    super.setUp();
    setUpDiskSpace();
    daemon = getMockLockssDaemon();
    pollerId = findPeerIdentity(localPeerKey);

    id1 = new MockPeerIdentity("TCP:[127.0.0.1]:8990");
    id2 = new MockPeerIdentity("TCP:[127.0.0.1]:8991");
    id3 = new MockPeerIdentity("TCP:[127.0.0.1]:8992");

    v3Poller = makeV3Poller("testing poll key");

    participant1 = new ParticipantUserData(id1, v3Poller, null);
    participant2 = new ParticipantUserData(id2, v3Poller, null);
    participant3 = new ParticipantUserData(id3, v3Poller, null);
  }
 public void setUp() throws Exception {
   super.setUp();
   theDaemon = getMockLockssDaemon();
   theDaemon.startDaemon();
   mau = new MockArchivalUnit(new MockPlugin(theDaemon));
   tempDirPath = getTempDir().getAbsolutePath() + File.separator;
   configHistoryParams(tempDirPath);
   repository = (HistoryRepositoryImpl) HistoryRepositoryImpl.createNewHistoryRepository(mau);
   repository.initService(theDaemon);
   repository.startService();
   if (idmgr == null) {
     idmgr = theDaemon.getIdentityManager();
     idmgr.startService();
   }
   testID1 = idmgr.stringToPeerIdentity("127.1.2.3");
   testID2 = idmgr.stringToPeerIdentity("127.4.5.6");
 }
Example #10
0
 public void setUp() throws Exception {
   super.setUp();
   plugin = new DefinablePlugin();
   plugin.initPlugin(getMockLockssDaemon(), "org.lockss.plugin.emls.EmlsPlugin");
 }