HBASE-12312 Another couple of createTable race conditions

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Dima Spivak 2014-10-28 23:40:22 +00:00 committed by stack
parent 80f83db0b8
commit a973fd514f
3 changed files with 7 additions and 2 deletions

View File

@ -141,7 +141,9 @@ public class TestReplicationBase {
Admin admin1 = new HBaseAdmin(conf1);
Admin admin2 = new HBaseAdmin(conf2);
admin1.createTable(table, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);
utility1.waitUntilAllRegionsAssigned(tableName);
admin2.createTable(table, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);
utility2.waitUntilAllRegionsAssigned(tableName);
htable1 = new HTable(conf1, tableName);
htable1.setWriteBufferSize(1024);
htable2 = new HTable(conf2, tableName);

View File

@ -1049,6 +1049,7 @@ public class TestAccessController extends SecureTestUtil {
htd.addFamily(new HColumnDescriptor(family1));
htd.addFamily(new HColumnDescriptor(family2));
admin.createTable(htd);
TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
// create temp users
User tblUser = User
@ -1323,6 +1324,7 @@ public class TestAccessController extends SecureTestUtil {
htd.addFamily(new HColumnDescriptor(family1));
htd.addFamily(new HColumnDescriptor(family2));
admin.createTable(htd);
TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
// create temp users
User user = User.createUserForTesting(TEST_UTIL.getConfiguration(), "user", new String[0]);
@ -1438,6 +1440,7 @@ public class TestAccessController extends SecureTestUtil {
htd.addFamily(new HColumnDescriptor(family2));
htd.setOwner(USER_OWNER);
admin.createTable(htd);
TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
List<UserPermission> perms;
@ -1911,6 +1914,7 @@ public class TestAccessController extends SecureTestUtil {
HTableDescriptor htd = new HTableDescriptor(TEST_TABLE2);
htd.addFamily(new HColumnDescriptor(TEST_FAMILY));
admin.createTable(htd);
TEST_UTIL.waitUntilAllRegionsAssigned(TEST_TABLE2);
// Starting a new RegionServer.
JVMClusterUtil.RegionServerThread newRsThread = hbaseCluster

View File

@ -127,8 +127,7 @@ public class TestScanEarlyTermination extends SecureTestUtil {
htd.setConfiguration(AccessControlConstants.CF_ATTRIBUTE_EARLY_OUT, "true");
admin.createTable(htd);
TEST_UTIL.waitTableEnabled(TEST_TABLE.getTableName());
TEST_UTIL.waitUntilAllRegionsAssigned(TEST_TABLE.getTableName());
}
@After