HBASE-2392 upgrade to ZooKeeper 3.3.0; fix up HQuorumPeer test
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@930195 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
358b82d728
commit
62db1f1cf6
|
@ -65,9 +65,6 @@ public class TestHQuorumPeer extends HBaseTestCase {
|
|||
/** */
|
||||
public void testMakeZKProps() {
|
||||
Properties properties = HQuorumPeer.makeZKProps(conf);
|
||||
assertEquals(3000, Integer.parseInt(properties.getProperty("tickTime")));
|
||||
assertEquals(Integer.valueOf(10), Integer.valueOf(properties.getProperty("initLimit")));
|
||||
assertEquals(Integer.valueOf(5), Integer.valueOf(properties.getProperty("syncLimit")));
|
||||
assertEquals(dataDir.toString(), properties.get("dataDir"));
|
||||
assertEquals(Integer.valueOf(21810), Integer.valueOf(properties.getProperty("clientPort")));
|
||||
assertEquals("localhost:2888:3888", properties.get("server.0"));
|
||||
|
@ -76,9 +73,6 @@ public class TestHQuorumPeer extends HBaseTestCase {
|
|||
String oldValue = conf.get(HConstants.ZOOKEEPER_QUORUM);
|
||||
conf.set(HConstants.ZOOKEEPER_QUORUM, "a.foo.bar,b.foo.bar,c.foo.bar");
|
||||
properties = HQuorumPeer.makeZKProps(conf);
|
||||
assertEquals(3000, Integer.parseInt(properties.getProperty("tickTime")));
|
||||
assertEquals(Integer.valueOf(10), Integer.valueOf(properties.getProperty("initLimit")));
|
||||
assertEquals(Integer.valueOf(5), Integer.valueOf(properties.getProperty("syncLimit")));
|
||||
assertEquals(dataDir.toString(), properties.get("dataDir"));
|
||||
assertEquals(Integer.valueOf(21810), Integer.valueOf(properties.getProperty("clientPort")));
|
||||
assertEquals("a.foo.bar:2888:3888", properties.get("server.0"));
|
||||
|
@ -91,9 +85,6 @@ public class TestHQuorumPeer extends HBaseTestCase {
|
|||
/** @throws Exception */
|
||||
public void testConfigInjection() throws Exception {
|
||||
String s =
|
||||
"tickTime=2000\n" +
|
||||
"initLimit=10\n" +
|
||||
"syncLimit=5\n" +
|
||||
"dataDir=${hbase.tmp.dir}/zookeeper\n" +
|
||||
"clientPort=2181\n" +
|
||||
"server.0=${hbase.master.hostname}:2888:3888\n";
|
||||
|
@ -102,9 +93,6 @@ public class TestHQuorumPeer extends HBaseTestCase {
|
|||
InputStream is = new ByteArrayInputStream(s.getBytes());
|
||||
Properties properties = HQuorumPeer.parseZooCfg(conf, is);
|
||||
|
||||
assertEquals(Integer.valueOf(2000), Integer.valueOf(properties.getProperty("tickTime")));
|
||||
assertEquals(Integer.valueOf(10), Integer.valueOf(properties.getProperty("initLimit")));
|
||||
assertEquals(Integer.valueOf(5), Integer.valueOf(properties.getProperty("syncLimit")));
|
||||
assertEquals(dataDir.toString(), properties.get("dataDir"));
|
||||
assertEquals(Integer.valueOf(2181), Integer.valueOf(properties.getProperty("clientPort")));
|
||||
assertEquals("localhost:2888:3888", properties.get("server.0"));
|
||||
|
@ -112,12 +100,6 @@ public class TestHQuorumPeer extends HBaseTestCase {
|
|||
QuorumPeerConfig config = new QuorumPeerConfig();
|
||||
config.parseProperties(properties);
|
||||
|
||||
int tickTime = config.getTickTime();
|
||||
assertEquals(2000, tickTime);
|
||||
int initLimit = config.getInitLimit();
|
||||
assertEquals(10, initLimit);
|
||||
int syncLimit = config.getSyncLimit();
|
||||
assertEquals(5, syncLimit);
|
||||
assertEquals(dataDir.toString(), config.getDataDir());
|
||||
assertEquals(2181, config.getClientPortAddress().getPort());
|
||||
Map<Long,QuorumServer> servers = config.getServers();
|
||||
|
|
Loading…
Reference in New Issue