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);
 }
Пример #3
0
  public void setUp() throws Exception {
    super.setUp();
    daemon = getMockLockssDaemon();

    historyRepo = new MyMockHistoryRepository();
    mplug = new MockPlugin(daemon);
    mau = new MockArchivalUnit(mplug);
  }
 public void tearDown() throws Exception {
   if (idmgr != null) {
     idmgr.stopService();
     idmgr = null;
   }
   repository.stopService();
   super.tearDown();
 }
Пример #5
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
   setUpDiskSpace();
   theDaemon = getMockLockssDaemon();
   plugin = new DefinablePlugin();
   plugin.initPlugin(getMockLockssDaemon(), "org.lockss.plugin.highwire.HighWireDrupalPlugin");
 }
 public void tearDown() throws Exception {
   theDaemon.getLockssRepository(sau1).stopService();
   theDaemon.getNodeManager(sau1).stopService();
   theDaemon.getPluginManager().stopService();
   theDaemon.getHashService().stopService();
   theDaemon.getSystemMetrics().stopService();
   theDaemon.stopDaemon();
   super.tearDown();
 }
Пример #7
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();
 }
Пример #8
0
  protected void setUp() throws Exception {
    super.setUp();
    TimeBase.setSimulated();

    initRequiredServices();

    testau.setPlugin(new MockPlugin());

    initTestPeerIDs();
    initTestMsg();
    initTestPolls();
  }
Пример #9
0
 /**
  * tearDown method for test case
  *
  * @throws Exception if removePoll failed
  */
 public void tearDown() throws Exception {
   pollmanager.stopService();
   theDaemon.getLockssRepository(testau).stopService();
   theDaemon.getHashService().stopService();
   theDaemon.getDatagramRouterManager().stopService();
   theDaemon.getRouterManager().stopService();
   theDaemon.getSystemMetrics().stopService();
   TimeBase.setReal();
   for (int i = 0; i < testV1msg.length; i++) {
     if (testV1msg[i] != null) pollmanager.removePoll(testV1msg[i].getKey());
   }
   super.tearDown();
 }
  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());
  }
Пример #11
0
  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");
 }
 public void tearDown() throws Exception {
   sau.deleteContentTree();
   theDaemon.stopDaemon();
   super.tearDown();
 }
Пример #14
0
 public void tearDown() throws Exception {
   TimeBase.setReal();
   super.tearDown();
 }
Пример #15
0
 public void tearDown() throws Exception {
   super.tearDown();
 }
Пример #16
0
 public void setUp() throws Exception {
   super.setUp();
   plugin = new DefinablePlugin();
   plugin.initPlugin(getMockLockssDaemon(), "org.lockss.plugin.emls.EmlsPlugin");
 }