[1/2] phoenix git commit: PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite
Repository: phoenix Updated Branches: refs/heads/4.x-cdh5.11 edb6dcf5f -> f6caad56d 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/5b45e8fd Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5b45e8fd Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5b45e8fd Branch: refs/heads/4.x-cdh5.11 Commit: 5b45e8fdeb1735bbee898b227b9bbd6f37e5ae31 Parents: edb6dcf Author: Ankit Singhal Authored: Fri Jun 1 22:42:50 2018 +0100 Committer: Pedro Boado Committed: Sat Jun 2 09:09:42 2018 +0100 -- .../apache/phoenix/end2end/SystemCatalogIT.java | 23 +--- 1 file changed, 15 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/5b45e8fd/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 a754cb6..7e479c6 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 @@ -18,7 +18,6 @@ package org.apache.phoenix.end2end; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import java.sql.Connection; import java.sql.DriverManager; @@ -26,14 +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.Test; +import org.junit.experimental.categories.Category; -public class SystemCatalogIT { +@Category(NeedsOwnMiniClusterTest.class) +public class SystemCatalogIT extends BaseTest { private HBaseTestingUtility testUtil = null; @After @@ -57,13 +60,17 @@ public class SystemCatalogIT { TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG"); RegionLocator rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(rl.getAllRegionLocations().size(), 1); +try { +// now attempt to split SYSTEM.CATALOG +testUtil.getHBaseAdmin().split(systemCatalog); -// now attempt to split SYSTEM.CATALOG -testUtil.getHBaseAdmin().split(systemCatalog); - -// make sure the split finishes (there's no synchronous splitting before HBase 2.x) -testUtil.getHBaseAdmin().disableTable(systemCatalog); -testUtil.getHBaseAdmin().enableTable(systemCatalog); +// make sure the split finishes (there's no synchronous splitting before HBase 2.x) +testUtil.getHBaseAdmin().disableTable(systemCatalog); +testUtil.getHBaseAdmin().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);
[1/2] phoenix git commit: PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 5ce06a062 -> 1ae275c15 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/9d29e905 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9d29e905 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9d29e905 Branch: refs/heads/4.x-HBase-0.98 Commit: 9d29e9051766d65a3cc2412ea1be09f111602a0d Parents: 5ce06a0 Author: Ankit Singhal Authored: Fri Jun 1 14:45:36 2018 -0700 Committer: Ankit Singhal Committed: Fri Jun 1 14:45:36 2018 -0700 -- .../apache/phoenix/end2end/SystemCatalogIT.java | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/9d29e905/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 acc7873..c21c399 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 @@ -18,7 +18,6 @@ package org.apache.phoenix.end2end; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import java.sql.Connection; import java.sql.DriverManager; @@ -26,13 +25,17 @@ 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.phoenix.query.BaseTest; import org.apache.phoenix.util.PhoenixRuntime; import org.junit.After; import org.junit.Test; +import org.junit.experimental.categories.Category; -public class SystemCatalogIT { +@Category(NeedsOwnMiniClusterTest.class) +public class SystemCatalogIT extends BaseTest { private HBaseTestingUtility testUtil = null; @After @@ -55,10 +58,13 @@ public class SystemCatalogIT { } TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG"); assertEquals(1, testUtil.getHBaseAdmin().getTableRegions(systemCatalog).size()); - -// now attempt to split SYSTEM.CATALOG -testUtil.getHBaseAdmin().split(systemCatalog.getName()); - +try { +// now attempt to split SYSTEM.CATALOG +testUtil.getHBaseAdmin().split(systemCatalog.getName()); +} catch (DoNotRetryIOException e) { +// table is not splittable +assert (e.getMessage().contains("NOT splittable")); +} // make sure the split finishes (there's no synchronous splitting before HBase 2.x) testUtil.getHBaseAdmin().disableTable(systemCatalog); testUtil.getHBaseAdmin().enableTable(systemCatalog);
[1/2] phoenix git commit: PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.2 445f72750 -> ce834bec4 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/091ffbd8 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/091ffbd8 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/091ffbd8 Branch: refs/heads/4.x-HBase-1.2 Commit: 091ffbd856275a95f826a7915db57e8918448e53 Parents: 445f727 Author: Ankit Singhal Authored: Fri Jun 1 14:42:50 2018 -0700 Committer: Ankit Singhal Committed: Fri Jun 1 14:42:50 2018 -0700 -- .../apache/phoenix/end2end/SystemCatalogIT.java | 23 +--- 1 file changed, 15 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/091ffbd8/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 7b6a543..6f49518 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 @@ -18,7 +18,6 @@ package org.apache.phoenix.end2end; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import java.sql.Connection; import java.sql.DriverManager; @@ -26,14 +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.Test; +import org.junit.experimental.categories.Category; -public class SystemCatalogIT { +@Category(NeedsOwnMiniClusterTest.class) +public class SystemCatalogIT extends BaseTest { private HBaseTestingUtility testUtil = null; @After @@ -57,13 +60,17 @@ public class SystemCatalogIT { TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG"); RegionLocator rl = testUtil.getConnection().getRegionLocator(systemCatalog); assertEquals(rl.getAllRegionLocations().size(), 1); +try { +// now attempt to split SYSTEM.CATALOG +testUtil.getHBaseAdmin().split(systemCatalog); -// now attempt to split SYSTEM.CATALOG -testUtil.getHBaseAdmin().split(systemCatalog); - -// make sure the split finishes (there's no synchronous splitting before HBase 2.x) -testUtil.getHBaseAdmin().disableTable(systemCatalog); -testUtil.getHBaseAdmin().enableTable(systemCatalog); +// make sure the split finishes (there's no synchronous splitting before HBase 2.x) +testUtil.getHBaseAdmin().disableTable(systemCatalog); +testUtil.getHBaseAdmin().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);
[1/2] phoenix git commit: PHOENIX-4769 Annotate SystemCatalogIT so that it will run with the test suite.
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 Authored: Fri Jun 1 14:12:22 2018 -0700 Committer: Ankit Singhal 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);