Repository: phoenix
Updated Branches:
  refs/heads/master a4ce14bad -> 86dae1ed7


PHOENIX-4255 Breakup StatsCollectorIT into several integration tests to limit 
number of tables created


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/86dae1ed
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/86dae1ed
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/86dae1ed

Branch: refs/heads/master
Commit: 86dae1ed7bc3101aa9fe3f780e31b02cacad02e2
Parents: a4ce14b
Author: Samarth Jain <[email protected]>
Authored: Thu Sep 28 23:48:08 2017 -0700
Committer: Samarth Jain <[email protected]>
Committed: Thu Sep 28 23:48:08 2017 -0700

----------------------------------------------------------------------
 .../phoenix/end2end/StatsCollectorIT.java       | 20 +++----------------
 ...SysTableNamespaceMappedStatsCollectorIT.java | 21 +++++++++++++++-----
 2 files changed, 19 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/86dae1ed/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
index 19b5275..da8e78d 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java
@@ -33,8 +33,6 @@ import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -71,12 +69,11 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public class StatsCollectorIT extends BaseUniqueNamesOwnClusterIT {
+public abstract class StatsCollectorIT extends BaseUniqueNamesOwnClusterIT {
     private final String tableDDLOptions;
     private final boolean columnEncoded;
     private String tableName;
@@ -86,7 +83,7 @@ public class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
     private final boolean userTableNamespaceMapped;
     private final boolean mutable;
     
-    public StatsCollectorIT(boolean mutable, boolean transactional, boolean 
userTableNamespaceMapped, boolean columnEncoded) {
+    protected StatsCollectorIT(boolean mutable, boolean transactional, boolean 
userTableNamespaceMapped, boolean columnEncoded) {
         StringBuilder sb = new StringBuilder();
         if (transactional) {
             sb.append("TRANSACTIONAL=true");
@@ -116,18 +113,7 @@ public class StatsCollectorIT extends 
BaseUniqueNamesOwnClusterIT {
         this.columnEncoded = columnEncoded;
         this.mutable = mutable;
     }
-    
-    @Parameters(name="columnEncoded = {0}, mutable = {1}, transactional = {2}, 
isUserTableNamespaceMapped = {3}")
-    public static Collection<Boolean[]> data() {
-        return Arrays.asList(new Boolean[][] {     
-                { false, false, false, false }, { false, false, false, true }, 
{ false, false, true, false }, { false, false, true, true },
-                // no need to test non column encoded mutable case and this is 
the same as non column encoded immutable 
-                //{ false, true, false, false }, { false, true, false, true }, 
{ false, true, true, false }, { false, true, true, true }, 
-                { true, false, false, false }, { true, false, false, true }, { 
true, false, true, false }, { true, false, true, true }, 
-                { true, true, false, false }, { true, true, false, true }, { 
true, true, true, false }, { true, true, true, true } 
-          });
-    }
-    
+
     @BeforeClass
     public static void doSetup() throws Exception {
         // enable name space mapping at global level on both client and server 
side

http://git-wip-us.apache.org/repos/asf/phoenix/blob/86dae1ed/phoenix-core/src/it/java/org/apache/phoenix/end2end/SysTableNamespaceMappedStatsCollectorIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SysTableNamespaceMappedStatsCollectorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SysTableNamespaceMappedStatsCollectorIT.java
index f9ef0c2..36779c2 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SysTableNamespaceMappedStatsCollectorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SysTableNamespaceMappedStatsCollectorIT.java
@@ -17,20 +17,31 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Map;
 
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.BeforeClass;
+import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Maps;
 
 public class SysTableNamespaceMappedStatsCollectorIT extends StatsCollectorIT {
-    
-    public SysTableNamespaceMappedStatsCollectorIT(boolean mutable, boolean 
transactional, boolean userTableNamespaceMapped, boolean columnEncoded) {
+
+    public SysTableNamespaceMappedStatsCollectorIT(boolean mutable, boolean 
transactional,
+            boolean userTableNamespaceMapped, boolean columnEncoded) {
         super(mutable, transactional, userTableNamespaceMapped, columnEncoded);
     }
-    
+
+    @Parameters(
+            name = "columnEncoded = {0}, mutable = {1}, transactional = {2}, 
isUserTableNamespaceMapped = {3}")
+    public static Collection<Boolean[]> data() {
+        return Arrays.asList(
+            new Boolean[][] { { true, true, false, false }, { true, true, 
false, true }, });
+    }
+
     @BeforeClass
     public static void doSetup() throws Exception {
         // enable name space mapping at global level on both client and server 
side
@@ -42,8 +53,8 @@ public class SysTableNamespaceMappedStatsCollectorIT extends 
StatsCollectorIT {
         clientProps.put(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, "true");
         clientProps.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(20));
         clientProps.put(QueryServices.IS_SYSTEM_TABLE_MAPPED_TO_NAMESPACE, 
"true");
-        setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), 
new ReadOnlyProps(clientProps.entrySet().iterator()));
+        setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()),
+            new ReadOnlyProps(clientProps.entrySet().iterator()));
     }
 
-
 }

Reply via email to