public void setUp() throws Exception { super.setUp(); theDaemon = getMockLockssDaemon(); mgr = new MyRepositoryManager(); theDaemon.setRepositoryManager(mgr); mgr.initService(theDaemon); }
public void setUp() throws Exception { super.setUp(); theDaemon = getMockLockssDaemon(); tempDir = getTempDir(); String tempDirPath = tempDir.getAbsolutePath(); System.setProperty("java.io.tmpdir", tempDirPath); Properties p = new Properties(); p.setProperty(IdentityManager.PARAM_IDDB_DIR, tempDirPath + "iddb"); p.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath); p.setProperty(IdentityManager.PARAM_LOCAL_IP, "127.0.0.1"); p.setProperty(V3LcapMessage.PARAM_REPAIR_DATA_THRESHOLD, "4096"); ConfigurationUtil.setCurrentConfigFromProps(p); IdentityManager idmgr = theDaemon.getIdentityManager(); idmgr.startService(); mPollMgr = new MockPollManager(); theDaemon.setPollManager(mPollMgr); try { m_testID = idmgr.stringToPeerIdentity("127.0.0.1"); } catch (IOException ex) { fail("can't open test host 127.0.0.1: " + ex); } m_repairProps = new CIProperties(); m_repairProps.setProperty("key1", "val1"); m_repairProps.setProperty("key2", "val2"); m_repairProps.setProperty("key3", "val3"); m_testVoteBlocks = V3TestUtils.makeVoteBlockList(10); m_testMsg = this.makeTestVoteMessage(m_testVoteBlocks); }
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(); 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(); }
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(); }
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(); }
protected void setUp() throws Exception { super.setUp(); TimeBase.setSimulated(); initRequiredServices(); testau.setPlugin(new MockPlugin()); initTestPeerIDs(); initTestMsg(); initTestPolls(); }
/** * 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()); }
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 setUp() throws Exception { super.setUp(); }
public void setUp() throws Exception { super.setUp(); tempDirPath = setUpDiskSpace(); startMockDaemon(); iau = createAu(); }
public void setUp() throws Exception { super.setUp(); mau = new MockArchivalUnit(); extractor = new GoslingHtmlLinkExtractor(); cb = new MyLinkExtractorCallback(); }
public void tearDown() throws Exception { sau.deleteContentTree(); theDaemon.stopDaemon(); super.tearDown(); }
public void tearDown() throws Exception { TimeBase.setReal(); super.tearDown(); }
public void tearDown() throws Exception { super.tearDown(); }
public void setUp() throws Exception { super.setUp(); mailer = new SmtpMailer(); }
public void setUp() throws Exception { super.setUp(); fact = new IOPScienceHtmlHashFilterFactory(); mau = new MockArchivalUnit(); }
public void setUp() throws Exception { super.setUp(); fact = new TaylorAndFrancisJavaScriptLinkRewriterFactory(); }