hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-19278 Reenable cleanup in test teardown in TestAccessController3 disabled by HBASE-14614
Date Thu, 16 Nov 2017 07:27:36 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 bc3542c0f -> 887489079


HBASE-19278 Reenable cleanup in test teardown in TestAccessController3 disabled by HBASE-14614

Remove a few unused imports.

Remove TestAsyncRegionAdminApi#testOffline, a test for a condition that
no longer exists (no offlining supported in hbase2).

M hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
 Uncomment cleanup called in test teardown.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/88748907
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/88748907
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/88748907

Branch: refs/heads/branch-2
Commit: 88748907980c7cc665c9676d0a3f6ac5ceedfeb6
Parents: bc3542c
Author: Michael Stack <stack@apache.org>
Authored: Wed Nov 15 19:03:50 2017 -0800
Committer: Michael Stack <stack@apache.org>
Committed: Wed Nov 15 23:27:28 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/TestRegionRebalancing.java     |  4 +--
 .../hbase/client/TestAsyncRegionAdminApi.java   | 28 --------------------
 .../procedure/TestServerCrashProcedure.java     |  1 -
 .../security/access/TestAccessController3.java  |  6 ++---
 4 files changed, 4 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/88748907/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
index cb9f768..467aada 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -43,7 +42,6 @@ import org.apache.hadoop.hbase.util.JVMClusterUtil;
 import org.apache.hadoop.hbase.util.Threads;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;

http://git-wip-us.apache.org/repos/asf/hbase/blob/88748907/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
index 9b552b4..1e3af40 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi.java
@@ -138,34 +138,6 @@ public class TestAsyncRegionAdminApi extends TestAsyncAdminBase {
     }
   }
 
-  @Ignore @Test
-  // Turning off this tests in AMv2. Doesn't make sense.Offlining means something
-  // different now.
-  // You can't 'offline' a region unless you know what you are doing
-  // Will cause the Master to tell the regionserver to shut itself down because
-  // regionserver is reporting the state as OPEN.
-  public void testOfflineRegion() throws Exception {
-    RegionInfo hri = createTableAndGetOneRegion(tableName);
-
-    RegionStates regionStates =
-        TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().getRegionStates();
-    admin.offline(hri.getRegionName()).get();
-
-    long timeoutTime = System.currentTimeMillis() + 3000;
-    while (true) {
-      if (regionStates.getRegionByStateOfTable(tableName).get(RegionState.State.OFFLINE)
-          .stream().anyMatch(r -> RegionInfo.COMPARATOR.compare(r, hri) == 0)) break;
-      long now = System.currentTimeMillis();
-      if (now > timeoutTime) {
-        fail("Failed to offline the region in time");
-        break;
-      }
-      Thread.sleep(10);
-    }
-    RegionState regionState = regionStates.getRegionState(hri);
-    assertTrue(regionState.isOffline());
-  }
-
   @Test
   public void testGetRegionByStateOfTable() throws Exception {
     RegionInfo hri = createTableAndGetOneRegion(tableName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/88748907/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java
index 9d6e765..627cbe8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java
@@ -40,7 +40,6 @@ import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 
 @Category({MasterTests.class, LargeTests.class})

http://git-wip-us.apache.org/repos/asf/hbase/blob/88748907/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
index 36b1787..11dbbd3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController3.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.TableNotFoundException;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment;
@@ -201,7 +202,7 @@ public class TestAccessController3 extends SecureTestUtil {
       TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads()) {
       rs = thread.getRegionServer();
     }
-    // cleanUp();
+    cleanUp();
     TEST_UTIL.shutdownMiniCluster();
     assertTrue("region server should have aborted due to FaultyAccessController", rs.isAborted());
   }
@@ -265,13 +266,12 @@ public class TestAccessController3 extends SecureTestUtil {
     // TODO: Skipping delete because of access issues w/ AMv2.
     // AMv1 seems to crash servers on exit too for same lack of
     // auth perms but it gets hung up.
-    /*
     try {
       deleteTable(TEST_UTIL, TEST_TABLE);
     } catch (TableNotFoundException ex) {
       // Test deleted the table, no problem
       LOG.info("Test deleted table " + TEST_TABLE);
-    }*/
+    }
     // Verify all table/namespace permissions are erased
     assertEquals(0, AccessControlLists.getTablePermissions(conf, TEST_TABLE).size());
     assertEquals(


Mime
View raw message