hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1450333 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java
Date Tue, 26 Feb 2013 18:23:49 GMT
Author: stack
Date: Tue Feb 26 18:23:48 2013
New Revision: 1450333

URL: http://svn.apache.org/r1450333
Log:
HBASE-7790 Refactor OpenRegionHandler so that the cleanup happens in one place - the finally
block; ADDENDUM

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java?rev=1450333&r1=1450332&r2=1450333&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java
Tue Feb 26 18:23:48 2013
@@ -237,52 +237,5 @@ public class TestOpenRegionHandler {
     assertEquals(EventType.RS_ZK_REGION_FAILED_OPEN, rt.getEventType());
   }
 
-  @Test
-  public void testTransitionToFailedOpenFromOffline() throws Exception {
-    Server server = new MockServer(HTU);
-    RegionServerServices rsServices = new MockRegionServerServices(server.getZooKeeper(),
-        server.getServerName());
-    // Create it OFFLINE, which is what it expects
-    ZKAssign.createNodeOffline(server.getZooKeeper(), TEST_HRI, server.getServerName());
-    // Create the handler
-    OpenRegionHandler handler = new OpenRegionHandler(server, rsServices, TEST_HRI, TEST_HTD)
{
-
-      @Override
-      boolean transitionZookeeperOfflineToOpening(String encodedName, int versionOfOfflineNode)
{
-        return false;
-      }
-    };
-    rsServices.getRegionsInTransitionInRS().put(TEST_HRI.getEncodedNameAsBytes(), Boolean.TRUE);
-
-    handler.process();
-
-    RegionTransition rt = RegionTransition.parseFrom(ZKAssign.getData(server.getZooKeeper(),
-        TEST_HRI.getEncodedName()));
-    assertEquals(EventType.RS_ZK_REGION_FAILED_OPEN, rt.getEventType());
-  }
-
-  @Test
-  public void testTransitionToFailedOpenFromOffline() throws Exception {
-    Server server = new MockServer(HTU);
-    RegionServerServices rsServices = new MockRegionServerServices(server.getZooKeeper(),
-        server.getServerName());
-    // Create it OFFLINE, which is what it expects
-    ZKAssign.createNodeOffline(server.getZooKeeper(), TEST_HRI, server.getServerName());
-    // Create the handler
-    OpenRegionHandler handler = new OpenRegionHandler(server, rsServices, TEST_HRI, TEST_HTD)
{
-
-      @Override
-      boolean transitionZookeeperOfflineToOpening(String encodedName, int versionOfOfflineNode)
{
-        return false;
-      }
-    };
-    rsServices.getRegionsInTransitionInRS().put(TEST_HRI.getEncodedNameAsBytes(), Boolean.TRUE);
-
-    handler.process();
-
-    RegionTransition rt = RegionTransition.parseFrom(ZKAssign.getData(server.getZooKeeper(),
-        TEST_HRI.getEncodedName()));
-    assertEquals(EventType.RS_ZK_REGION_FAILED_OPEN, rt.getEventType());
-  }
 }
 



Mime
View raw message