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/src/contrib/hbase@551361 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2007-06-27 22:37:07 +00:00
parent a31d0e5f31
commit 2fa16d4fdf
3 changed files with 24 additions and 44 deletions

View File

@ -40,3 +40,6 @@ Trunk (unreleased changes)
Added an hbase-default.xml property for specifying what HRegionInterface extension to use
for proxy server connection.
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.

View File

@ -31,22 +31,27 @@ public class TestCleanRegionServerExit extends HBaseClusterTestCase {
public void testCleanRegionServerExit()
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.

View File

@ -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.
}
}