Przeglądaj źródła

HADOOP-1537. Catch exceptions in testCleanRegionServerExit so we can see what is failing.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@551361 13f79535-47bb-0310-9956-ffa450edef68
Jim Kellerman 18 lat temu
rodzic
commit
cf16412012

+ 3 - 0
src/contrib/hbase/CHANGES.txt

@@ -40,3 +40,6 @@ Trunk (unreleased changes)
      Added an hbase-default.xml property for specifying what HRegionInterface extension to use
      Added an hbase-default.xml property for specifying what HRegionInterface extension to use
      for proxy server connection. 
      for proxy server connection. 
  24. HADOOP-1534. [hbase] Memcache scanner fails if start key not present
  24. HADOOP-1534. [hbase] Memcache scanner fails if start key not present
+ 25. HADOOP-1537. Catch exceptions in testCleanRegionServerExit so we can see
+     what is failing.
+

+ 21 - 16
src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCleanRegionServerExit.java

@@ -31,22 +31,27 @@ public class TestCleanRegionServerExit extends HBaseClusterTestCase {
   
   
   public void testCleanRegionServerExit()
   public void testCleanRegionServerExit()
   throws IOException, InterruptedException {
   throws IOException, InterruptedException {
-    // When the META table can be opened, the region servers are running
-    this.client.openTable(HConstants.META_TABLE_NAME);
-    // Put something into the meta table.
-    this.client.createTable(new HTableDescriptor(getName()));
-    // Get current region server instance.
-    HRegionServer hsr = this.cluster.regionServers.get(0);
-    Thread hrst = this.cluster.regionThreads.get(0);
-    // Start up a new one to take over serving of root and meta after we shut
-    // down the current meta/root host.
-    this.cluster.startRegionServer();
-    // Now shutdown the region server and wait for it to go down.
-    hsr.stop();
-    hrst.join();
-    // The recalibration of the client is not working properly.  FIX.
-    // After above is fixed, add in assertions that we can get data from
-    // newly located meta table.
+    try {
+      // When the META table can be opened, the region servers are running
+      this.client.openTable(HConstants.META_TABLE_NAME);
+      // Put something into the meta table.
+      this.client.createTable(new HTableDescriptor(getName()));
+      // Get current region server instance.
+      HRegionServer hsr = this.cluster.regionServers.get(0);
+      Thread hrst = this.cluster.regionThreads.get(0);
+      // Start up a new one to take over serving of root and meta after we shut
+      // down the current meta/root host.
+      this.cluster.startRegionServer();
+      // Now shutdown the region server and wait for it to go down.
+      hsr.stop();
+      hrst.join();
+      // The recalibration of the client is not working properly.  FIX.
+      // After above is fixed, add in assertions that we can get data from
+      // newly located meta table.
+    } catch(Exception e) {
+      e.printStackTrace();
+      fail();
+    }
   }
   }
 
 
 /* Comment out till recalibration of client is working properly.
 /* Comment out till recalibration of client is working properly.

+ 0 - 28
src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerAbort.java

@@ -1,28 +0,0 @@
-/**
- * Copyright 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-/** Tests region server failover when a region server exits cleanly */
-public class TestRegionServerAbort extends TestCase {
-  /** The test */
-  public void testRegionServerAbort() {
-   // REMOVE THIS CLASS. TEST HAS BEEN MOVED TO TestCleanRegionExit.
-  }
-}