HBASE-2539 Cannot start ZK before the rest in tests anymore
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@945956 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1d6943297
commit
96321df582
|
@ -334,6 +334,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2562 bin/hbase doesn't work in-situ in maven
|
HBASE-2562 bin/hbase doesn't work in-situ in maven
|
||||||
(Todd Lipcon via Stack)
|
(Todd Lipcon via Stack)
|
||||||
HBASE-2449 Local HBase does not stop properly
|
HBASE-2449 Local HBase does not stop properly
|
||||||
|
HBASE-2539 Cannot start ZK before the rest in tests anymore
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -151,13 +151,14 @@ public class HBaseTestingUtility {
|
||||||
* @see #shutdownMiniZKCluster()
|
* @see #shutdownMiniZKCluster()
|
||||||
*/
|
*/
|
||||||
public void startMiniZKCluster() throws Exception {
|
public void startMiniZKCluster() throws Exception {
|
||||||
isRunningCluster();
|
startMiniZKCluster(setupClusterTestBuildDir());
|
||||||
this.clusterTestBuildDir = setupClusterTestBuildDir();
|
|
||||||
startMiniZKCluster(this.clusterTestBuildDir);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startMiniZKCluster(final File dir) throws Exception {
|
private void startMiniZKCluster(final File dir) throws Exception {
|
||||||
|
if (this.zkCluster != null) {
|
||||||
|
throw new IOException("Cluster already running at " + dir);
|
||||||
|
}
|
||||||
this.zkCluster = new MiniZooKeeperCluster();
|
this.zkCluster = new MiniZooKeeperCluster();
|
||||||
int clientPort = this.zkCluster.startup(dir);
|
int clientPort = this.zkCluster.startup(dir);
|
||||||
this.conf.set("hbase.zookeeper.property.clientPort",
|
this.conf.set("hbase.zookeeper.property.clientPort",
|
||||||
|
|
|
@ -45,6 +45,8 @@ public class TestZooKeeper {
|
||||||
*/
|
*/
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
|
// Test we can first start the ZK cluster by itself
|
||||||
|
TEST_UTIL.startMiniZKCluster();
|
||||||
TEST_UTIL.getConfiguration().setBoolean("dfs.support.append", true);
|
TEST_UTIL.getConfiguration().setBoolean("dfs.support.append", true);
|
||||||
TEST_UTIL.startMiniCluster(1);
|
TEST_UTIL.startMiniCluster(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue