narendly commented on a change in pull request #765: Add DedicatedZkClient and update DedicatedZkClientFactory URL: https://github.com/apache/helix/pull/765#discussion_r381819357
########## File path: zookeeper-api/src/test/java/org/apache/helix/zookeeper/impl/client/ZkTestBase.java ########## @@ -0,0 +1,148 @@ +package org.apache.helix.zookeeper.impl.client; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; +import java.io.IOException; +import java.lang.management.ManagementFactory; +import java.util.HashMap; +import java.util.Map; + +import javax.management.MBeanServerConnection; +import javax.management.ObjectName; + +import org.apache.commons.io.FileUtils; +import org.apache.helix.zookeeper.zkclient.IDefaultNameSpace; +import org.apache.helix.zookeeper.zkclient.ZkServer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.Assert; +import org.testng.annotations.AfterSuite; +import org.testng.annotations.BeforeSuite; + + +/** + * Test base class for various integration tests with an in-memory ZooKeeper. + */ +public class ZkTestBase { + private static final Logger LOG = LoggerFactory.getLogger(ZkTestBase.class); + private static final MBeanServerConnection MBEAN_SERVER = + ManagementFactory.getPlatformMBeanServer(); + + // maven surefire-plugin's multiple ZK config keys + private static final String MULTI_ZK_PROPERTY_KEY = "multiZk"; + private static final String NUM_ZK_PROPERTY_KEY = "numZk"; + + protected static final String ZK_PREFIX = "localhost:"; + protected static final int ZK_START_PORT = 2183; Review comment: Changed the port so this is no longer a concern. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
