hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [1/4] hbase git commit: HBASE-13285 Fix flaky getRegions() in TestAccessController.setUp()
Date Thu, 19 Mar 2015 18:53:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 89471870b -> cab71fd86
  refs/heads/branch-1 9e92e3362 -> 1f7b7781a
  refs/heads/branch-1.0 d443c7096 -> bc029b9ea
  refs/heads/master 27cf749af -> 6a95dd355


HBASE-13285 Fix flaky getRegions() in TestAccessController.setUp()


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

Branch: refs/heads/master
Commit: 6a95dd35511f4216481d8d0ffd4952ed1893a1c4
Parents: 27cf749
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Thu Mar 19 17:54:46 2015 +0000
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Thu Mar 19 17:54:46 2015 +0000

----------------------------------------------------------------------
 .../hbase/security/access/TestAccessController.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6a95dd35/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
index 9a45116..11aa5db 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
@@ -232,7 +232,7 @@ public class TestAccessController extends SecureTestUtil {
     htd.addFamily(hcd);
     htd.setOwner(USER_OWNER);
     admin.createTable(htd, new byte[][] { Bytes.toBytes("s") });
-    TEST_UTIL.waitTableEnabled(TEST_TABLE.getTableName());
+    TEST_UTIL.waitUntilAllRegionsAssigned(TEST_TABLE.getTableName());
 
     HRegion region = TEST_UTIL.getHBaseCluster().getRegions(TEST_TABLE.getTableName()).get(0);
     RegionCoprocessorHost rcpHost = region.getCoprocessorHost();
@@ -930,7 +930,7 @@ public class TestAccessController extends SecureTestUtil {
       setPermission(loadPath, FsPermission.valueOf("-rwxrwxrwx"));
 
       try (HTable table = (HTable)TEST_UTIL.getConnection().getTable(tableName)) {
-        TEST_UTIL.waitTableEnabled(tableName);
+        TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
         LoadIncrementalHFiles loader = new LoadIncrementalHFiles(conf);
         loader.doBulkLoad(loadPath, table);
       }
@@ -2173,13 +2173,13 @@ public class TestAccessController extends SecureTestUtil {
     String namespace = "testNamespaceUserGrant";
     NamespaceDescriptor desc = NamespaceDescriptor.create(namespace).build();
     TEST_UTIL.getMiniHBaseCluster().getMaster().createNamespace(desc);
-    
+
     // Grant namespace READ to USER_NONE, this should supersede any table permissions
     grantOnNamespace(TEST_UTIL, USER_NONE.getShortName(), namespace, Permission.Action.READ);
 
     // Now USER_NONE should be able to read also
     verifyAllowed(getAction, USER_NONE);
-    
+
     TEST_UTIL.getMiniHBaseCluster().getMaster().deleteNamespace(namespace);
   }
 
@@ -2392,7 +2392,7 @@ public class TestAccessController extends SecureTestUtil {
     // Verify that EXEC permission is checked correctly
     verifyDenied(execEndpointAction, userB);
     verifyAllowed(execEndpointAction, userA);
-    
+
     String namespace = "testCoprocessorExec";
     NamespaceDescriptor desc = NamespaceDescriptor.create(namespace).build();
     TEST_UTIL.getMiniHBaseCluster().getMaster().createNamespace(desc);
@@ -2402,7 +2402,7 @@ public class TestAccessController extends SecureTestUtil {
 
     // User B should now be allowed also
     verifyAllowed(execEndpointAction, userA, userB);
-    
+
     TEST_UTIL.getMiniHBaseCluster().getMaster().deleteNamespace(namespace);
   }
 


Mime
View raw message