@Test
  public void testRepair() throws Exception {
    NetworkManager node = NetworkTestUtil.getRandomNode(network);
    UseCaseTestUtil.registerAndLogin(
        generateRandomCredentials(), node, FileTestUtil.getTempDirectory());

    Locations repaired = node.getSession().getLocationsManager().repairLocations();
    Assert.assertNotNull(repaired);
    Assert.assertEquals(0, repaired.getPeerAddresses().size());
  }
Esempio n. 2
0
  @BeforeClass
  public static void initTest() throws Exception {
    testClass = LogoutTest.class;
    beforeClass();

    network = NetworkTestUtil.createNetwork(DEFAULT_NETWORK_SIZE);
    userCredentials = generateRandomCredentials();

    UseCaseTestUtil.registerAndLogin(
        userCredentials, network.get(0), FileTestUtil.getTempDirectory());
  }