Repository: phoenix Updated Branches: refs/heads/5.x-HBase-2.0 c489587e4 -> 3a7c90339
PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f8a1f1ec Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f8a1f1ec Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f8a1f1ec Branch: refs/heads/5.x-HBase-2.0 Commit: f8a1f1ece77a9684b72d04a2d25148cb044e56ce Parents: c489587 Author: Ankit Singhal <ankitsingha...@gmail.com> Authored: Fri Jun 1 14:12:22 2018 -0700 Committer: Ankit Singhal <ankitsingha...@gmail.com> Committed: Fri Jun 1 14:12:22 2018 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/end2end/SystemCatalogIT.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/f8a1f1ec/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java index 9c66b9a..2c7b992 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogIT.java @@ -25,16 +25,18 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; +import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.RegionLocator; +import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.util.PhoenixRuntime; import org.junit.After; -import org.junit.Ignore; import org.junit.Test; +import org.junit.experimental.categories.Category; -@Ignore -public class SystemCatalogIT { +@Category(NeedsOwnMiniClusterTest.class) +public class SystemCatalogIT extends BaseTest { private HBaseTestingUtility testUtil = null; @After @@ -59,12 +61,17 @@ public class SystemCatalogIT { RegionLocator rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(rl.getAllRegionLocations().size(), 1); + try{ // now attempt to split SYSTEM.CATALOG testUtil.getAdmin().split(systemCatalog); // make sure the split finishes (there's no synchronous splitting before HBase 2.x) testUtil.getAdmin().disableTable(systemCatalog); testUtil.getAdmin().enableTable(systemCatalog); + }catch(DoNotRetryIOException e){ + //table is not splittable + assert(e.getMessage().contains("NOT splittable")); + } // test again... Must still be exactly one region. rl = testUtil.getConnection().getRegionLocator(systemCatalog);