Github user karanmehta93 commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/309#discussion_r219323543
--- Diff: phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
---
@@ -1780,15 +1780,15 @@ private static void verifySequence(String
tenantID, String sequenceName, String
/**
- * Split SYSTEM.CATALOG at the given split point
+ * Split a table at the given split point
*/
- protected static void splitRegion(byte[] splitPoint) throws
SQLException, IOException, InterruptedException {
+ protected static void splitRegion(TableName tableName, byte[]
splitPoint) throws SQLException, IOException, InterruptedException {
Admin admin =
driver.getConnectionQueryServices(getUrl(),
TestUtil.TEST_PROPERTIES).getAdmin();
-
admin.split(PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME,
splitPoint);
+ admin.split(tableName, splitPoint);
// make sure the split finishes (there's no synchronous splitting
before HBase 2.x)
-
admin.disableTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME);
-
admin.enableTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_HBASE_TABLE_NAME);
+ admin.disableTable(tableName);
--- End diff --
The call to split() method should get blocked until the split is complete,
isn't it?
---