hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1425513 [7/7] - in /hbase/branches/0.94-test: ./ bin/ conf/ security/src/main/java/org/apache/hadoop/hbase/ipc/ security/src/main/java/org/apache/hadoop/hbase/security/access/ security/src/test/java/org/apache/hadoop/hbase/security/access/...
Date Sun, 23 Dec 2012 19:34:56 GMT
Modified: hbase/branches/0.94-test/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKTableReadOnly.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94-test/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKTableReadOnly.java?rev=1425513&r1=1425512&r2=1425513&view=diff
==============================================================================
--- hbase/branches/0.94-test/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKTableReadOnly.java
(original)
+++ hbase/branches/0.94-test/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKTableReadOnly.java
Sun Dec 23 19:34:53 2012
@@ -68,53 +68,33 @@ public class TestZKTableReadOnly {
     return ZKTableReadOnly.isEnabledTable(zkw, tableName);
   }
 
-  private void runClientCompatiblityWith92ZNodeTest(String tableName, Configuration conf)
-  throws Exception {
-    ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf,
-      tableName, abortable, true);
-    assertTrue(enableAndCheckEnabled(zkw, tableName));
-  }
   /**
-   * Test that client ZK reader can handle the 0.92 table format znode.
+   * Test that client ZK reader can handle the 0.92 table znode format.
    */
   @Test
   public void testClientCompatibilityWith92ZNode() throws Exception {
-    // test without useMulti
-    String tableName = "testClientCompatibilityWith92ZNode";
+    final String tableName = "testClientCompatibilityWith92ZNode";
+
     // Set the client to read from the 0.92 table znode format
     Configuration conf = HBaseConfiguration.create(TEST_UTIL.getConfiguration());
     String znode92 = conf.get("zookeeper.znode.masterTableEnableDisable92", "table92");
     conf.set("zookeeper.znode.clientTableEnableDisable", znode92);
-    runClientCompatiblityWith92ZNodeTest(tableName, conf);
-
-    // test with useMulti
-    tableName = "testClientCompatibilityWith92ZNodeUseMulti";
-    conf.setBoolean(HConstants.ZOOKEEPER_USEMULTI, true);
-    runClientCompatiblityWith92ZNodeTest(tableName, conf);
-  }
 
-  private void runClientCompatibilityWith94ZNodeTest(String tableName, Configuration conf)
-  throws Exception {
-    ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
+    ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf,
       tableName, abortable, true);
     assertTrue(enableAndCheckEnabled(zkw, tableName));
   }
 
   /**
-   * Test that client ZK reader can handle the current (0.94) table format znode.
+   * Test that client ZK reader can handle the current (0.94) table format znode
    */
   @Test
   public void testClientCompatibilityWith94ZNode() throws Exception {
-    String tableName = "testClientCompatibilityWith94ZNode";
+    final String tableName = "testClientCompatibilityWith94ZNode";
 
-    // without useMulti
-    runClientCompatibilityWith94ZNodeTest(tableName, TEST_UTIL.getConfiguration());
-
-    // with useMulti
-    tableName = "testClientCompatiblityWith94ZNodeUseMulti";
-    Configuration conf = HBaseConfiguration.create(TEST_UTIL.getConfiguration());
-    conf.setBoolean(HConstants.ZOOKEEPER_USEMULTI, true);
-    runClientCompatibilityWith94ZNodeTest(tableName, conf);
+    ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
+      tableName, abortable, true);
+    assertTrue(enableAndCheckEnabled(zkw, tableName));
   }
 
   @org.junit.Rule



Mime
View raw message