hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1375897 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
Date Wed, 22 Aug 2012 05:05:14 GMT
Author: stack
Date: Wed Aug 22 05:05:14 2012
New Revision: 1375897

URL: http://svn.apache.org/viewvc?rev=1375897&view=rev
Log:
HBASE-6632 [0.92 UNIT TESTS] testCreateTableRPCTimeOut sets rpc timeout to 1500ms and leaves
it (testHundredsOfTable fails w/ 1500ms timeout)

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java?rev=1375897&r1=1375896&r2=1375897&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java Wed
Aug 22 05:05:14 2012
@@ -1113,16 +1113,21 @@ public class TestAdmin {
   @Test
   public void testCreateTableRPCTimeOut() throws Exception {
     String name = "testCreateTableRPCTimeOut";
+    int oldTimeout = TEST_UTIL.getConfiguration().
+      getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
     TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 1500);
-
-    int expectedRegions = 100;
-    // Use 80 bit numbers to make sure we aren't limited
-    byte [] startKey = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
-    byte [] endKey =   { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
-    HBaseAdmin hbaseadmin = new HBaseAdmin(TEST_UTIL.getConfiguration());
-    hbaseadmin.createTable(new HTableDescriptor(name), startKey, endKey,
-      expectedRegions);
-    hbaseadmin.close();
+    try {
+      int expectedRegions = 100;
+      // Use 80 bit numbers to make sure we aren't limited
+      byte [] startKey = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+      byte [] endKey =   { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
+      HBaseAdmin hbaseadmin = new HBaseAdmin(TEST_UTIL.getConfiguration());
+      hbaseadmin.createTable(new HTableDescriptor(name), startKey, endKey,
+        expectedRegions);
+      hbaseadmin.close();
+    } finally {
+      TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, oldTimeout);
+    }
   }
 
   /**



Mime
View raw message