Search in sources :

Example 1 with AdminThread

use of org.apache.helix.webapp.AdminTestHelper.AdminThread in project helix by apache.

the class AdminTestBase method beforeSuite.

@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.startZkServer(ZK_ADDR);
    AssertJUnit.assertTrue(_zkServer != null);
    ZKClientPool.reset();
    _gZkClient = new ZkClient(ZK_ADDR, ZkClient.DEFAULT_CONNECTION_TIMEOUT, ZkClient.DEFAULT_SESSION_TIMEOUT, new ZNRecordSerializer());
    _gSetupTool = new ClusterSetup(_gZkClient);
    // start admin
    _adminThread = new AdminThread(ZK_ADDR, ADMIN_PORT);
    _adminThread.start();
    // create a client
    _gClient = new Client(Protocol.HTTP);
    // wait for the web service to start
    Thread.sleep(100);
}
Also used : ZkClient(org.apache.helix.manager.zk.ZkClient) AdminThread(org.apache.helix.webapp.AdminTestHelper.AdminThread) ClusterSetup(org.apache.helix.tools.ClusterSetup) ZkClient(org.apache.helix.manager.zk.ZkClient) Client(org.restlet.Client) ZNRecordSerializer(org.apache.helix.manager.zk.ZNRecordSerializer) BeforeSuite(org.testng.annotations.BeforeSuite)

Aggregations

ZNRecordSerializer (org.apache.helix.manager.zk.ZNRecordSerializer)1 ZkClient (org.apache.helix.manager.zk.ZkClient)1 ClusterSetup (org.apache.helix.tools.ClusterSetup)1 AdminThread (org.apache.helix.webapp.AdminTestHelper.AdminThread)1 Client (org.restlet.Client)1 BeforeSuite (org.testng.annotations.BeforeSuite)1