예제 #1
0
 private void initTestPeerIDs() {
   try {
     testID = idmgr.stringToPeerIdentity("127.0.0.1");
     testID1 = idmgr.stringToPeerIdentity("1.1.1.1");
   } catch (IdentityManager.MalformedIdentityKeyException ex) {
     fail("can't open test host");
   }
 }
 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");
 }