diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java index ccbff95d2eb..538cad1c7b8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestOpenRegionHandler.java @@ -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()); - } }