hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r955070 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
Date Tue, 15 Jun 2010 22:13:25 GMT
Author: jdcryans
Date: Tue Jun 15 22:13:25 2010
New Revision: 955070

URL: http://svn.apache.org/viewvc?rev=955070&view=rev
Log:
HBASE-2732  TestZooKeeper was broken, HBASE-2691 showed it

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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=955070&r1=955069&r2=955070&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Jun 15 22:13:25 2010
@@ -385,6 +385,7 @@ Release 0.21.0 - Unreleased
                (Kannan Muthukkaruppan via Todd Lipcon)
    HBASE-2712  Cached region location that went stale won't recover if 
                asking for first row
+   HBASE-2732  TestZooKeeper was broken, HBASE-2691 showed it
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

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=955070&r1=955069&r2=955070&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 Tue Jun 15 22:13:25
2010
@@ -51,7 +51,7 @@ public class TestZooKeeper {
   private final static HBaseTestingUtility
       TEST_UTIL = new HBaseTestingUtility();
 
-  private Configuration    conf;
+  private static Configuration conf;
 
   /**
    * @throws java.lang.Exception
@@ -61,7 +61,8 @@ public class TestZooKeeper {
     // Test we can first start the ZK cluster by itself
     TEST_UTIL.startMiniZKCluster();
     TEST_UTIL.getConfiguration().setBoolean("dfs.support.append", true);
-    TEST_UTIL.startMiniCluster(1);
+    TEST_UTIL.startMiniCluster(2);
+    conf = TEST_UTIL.getConfiguration();
   }
 
   /**
@@ -77,16 +78,10 @@ public class TestZooKeeper {
    */
   @Before
   public void setUp() throws Exception {
-    conf = TEST_UTIL.getConfiguration();
+    TEST_UTIL.ensureSomeRegionServersAvailable(2);
   }
 
   /**
-   * @throws java.lang.Exception
-   */
-  @After
-  public void tearDown() throws Exception {}
-
-  /**
    * See HBASE-1232 and http://wiki.apache.org/hadoop/ZooKeeper/FAQ#4.
    * @throws IOException
    * @throws InterruptedException
@@ -118,14 +113,12 @@ public class TestZooKeeper {
   public void testRegionServerSessionExpired() throws Exception{
     LOG.info("Starting testRegionServerSessionExpired");
     new HTable(conf, HConstants.META_TABLE_NAME);
-    TEST_UTIL.getMiniHBaseCluster().getRegionServer(0).getConfiguration().
-      setBoolean("hbase.regionserver.restart.on.zk.expire", true);
     TEST_UTIL.expireRegionServerSession(0);
     testSanity();
   }
   @Test
   public void testMasterSessionExpired() throws Exception {
-    LOG.info("Starting testRegionServerSessionExpired");
+    LOG.info("Starting testMasterSessionExpired");
     new HTable(conf, HConstants.META_TABLE_NAME);
     TEST_UTIL.expireMasterSession();
     testSanity();



Mime
View raw message