Esempio n. 1
0
  @AfterSuite
  public void afterSuite() {
    // System.out.println("START AdminTestBase.afterSuite() at " + new
    // Date(System.currentTimeMillis()));
    // stop admin
    _adminThread.stop();

    // stop zk
    ZKClientPool.reset();
    _gZkClient.close();

    TestHelper.stopZkServer(_zkServer);
    // System.out.println("END AdminTestBase.afterSuite() at " + new
    // Date(System.currentTimeMillis()));
  }
Esempio n. 2
0
  @BeforeSuite
  public void beforeSuite() throws Exception {
    // TODO: use logging.properties file to config java.util.logging.Logger levels
    java.util.logging.Logger topJavaLogger = java.util.logging.Logger.getLogger("");
    topJavaLogger.setLevel(Level.WARNING);

    // start zk
    _zkServer = TestHelper.startZkSever(ZK_ADDR);
    AssertJUnit.assertTrue(_zkServer != null);
    ZKClientPool.reset();

    _gZkClient = new ZkClient(ZK_ADDR);
    _gZkClient.setZkSerializer(new ZNRecordSerializer());
    _gSetupTool = new ClusterSetup(ZK_ADDR);

    // start admin
    _adminThread = new AdminThread(ZK_ADDR, ADMIN_PORT);
    _adminThread.start();

    // wait for the web service to start
    Thread.sleep(100);
  }