hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1100427 - /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
Date Sat, 07 May 2011 01:32:35 GMT
Author: stack
Date: Sat May  7 01:32:34 2011
New Revision: 1100427

URL: http://svn.apache.org/viewvc?rev=1100427&view=rev
Log:
HBASE-3863 Fix failing TestHBaseFsck.testHBaseFsckMeta unit test

Modified:
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java?rev=1100427&r1=1100426&r2=1100427&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java Sat May  7 01:32:34
2011
@@ -100,9 +100,13 @@ public class TestZooKeeper {
     HConnection connection = HConnectionManager.getConnection(c);
     ZooKeeperWatcher connectionZK = connection.getZooKeeperWatcher();
     long sessionID = connectionZK.getZooKeeper().getSessionId();
-    byte[] password = connectionZK.getZooKeeper().getSessionPasswd();
+    byte [] password = connectionZK.getZooKeeper().getSessionPasswd();
+
     ZooKeeper zk = new ZooKeeper(quorumServers, sessionTimeout,
         EmptyWatcher.instance, sessionID, password);
+    LOG.info("Session timeout=" + zk.getSessionTimeout() +
+      ", original=" + sessionTimeout +
+      ", id=" + zk.getSessionId());
     zk.close();
 
     Thread.sleep(sessionTimeout * 3L);
@@ -110,11 +114,11 @@ public class TestZooKeeper {
     // provoke session expiration by doing something with ZK
     ZKUtil.dump(connectionZK);
 
-    // Check that the old ZK conenction is closed, means we did expire
+    // Check that the old ZK connection is closed, means we did expire
     System.err.println("ZooKeeper should have timed out");
-    LOG.info("state=" + connectionZK.getZooKeeper().getState());
-    Assert.assertTrue(connectionZK.getZooKeeper().getState().equals(
-        States.CLOSED));
+    String state = connectionZK.getZooKeeper().getState().toString();
+    Assert.assertTrue("State=" + state,
+      connectionZK.getZooKeeper().getState().equals(States.CLOSED));
 
     // Check that the client recovered
     ZooKeeperWatcher newConnectionZK = connection.getZooKeeperWatcher();



Mime
View raw message