[3/6] phoenix git commit: PHOENIX-3253 Make changes to tests to support method level parallelization

2016-09-22 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/26109c4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
index dc22ff8..e9c0c55 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
@@ -60,12 +60,12 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Before
 public void generateTableName() {
-baseTableName = generateRandomString();
+baseTableName = generateUniqueName();
 }
 
 @Test
 public void noOrder() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -73,7 +73,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void noOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid, code))";
 Object[][] rows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 3}};
 runQueryTest(ddl, upsert("oid", "code"), rows, rows, table);
@@ -81,7 +81,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY ASC)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -89,7 +89,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid ASC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -98,7 +98,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 for (String type : new String[]{"CHAR(2)", "VARCHAR"}) {
 String ddl = "CREATE table " + table + " (pk ${type} NOT NULL 
PRIMARY KEY DESC)".replace("${type}", type);
 runQueryTest(ddl, "pk", new Object[][]{{"aa"}, {"bb"}, {"cc"}}, 
new Object[][]{{"cc"}, {"bb"}, {"aa"}},
@@ -108,7 +108,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK1() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 
3}};
 Object[][] expectedRows = new Object[][]{{"o3", 3}, {"o2", 2}, {"o1", 
1}};
@@ -117,7 +117,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK2() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -126,7 +126,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void equalityDescInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY DESC)";
 runQueryTest(ddl, upsert("pk"), new Object[][]{{"a"}, {"b"}, {"c"}}, 
new Object[][]{{"b"}}, new WhereCondition("pk", "=", "'b'"),
 table);
@@ -134,7 +134,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void 

[3/6] phoenix git commit: PHOENIX-3253 Make changes to tests to support method level parallelization

2016-09-22 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
index dc22ff8..e9c0c55 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
@@ -60,12 +60,12 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Before
 public void generateTableName() {
-baseTableName = generateRandomString();
+baseTableName = generateUniqueName();
 }
 
 @Test
 public void noOrder() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -73,7 +73,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void noOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid, code))";
 Object[][] rows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 3}};
 runQueryTest(ddl, upsert("oid", "code"), rows, rows, table);
@@ -81,7 +81,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY ASC)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -89,7 +89,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid ASC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -98,7 +98,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 for (String type : new String[]{"CHAR(2)", "VARCHAR"}) {
 String ddl = "CREATE table " + table + " (pk ${type} NOT NULL 
PRIMARY KEY DESC)".replace("${type}", type);
 runQueryTest(ddl, "pk", new Object[][]{{"aa"}, {"bb"}, {"cc"}}, 
new Object[][]{{"cc"}, {"bb"}, {"aa"}},
@@ -108,7 +108,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK1() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 
3}};
 Object[][] expectedRows = new Object[][]{{"o3", 3}, {"o2", 2}, {"o1", 
1}};
@@ -117,7 +117,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK2() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -126,7 +126,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void equalityDescInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY DESC)";
 runQueryTest(ddl, upsert("pk"), new Object[][]{{"a"}, {"b"}, {"c"}}, 
new Object[][]{{"b"}}, new WhereCondition("pk", "=", "'b'"),
 table);
@@ -134,7 +134,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void 

[3/6] phoenix git commit: PHOENIX-3253 Make changes to tests to support method level parallelization

2016-09-22 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
index dc22ff8..e9c0c55 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
@@ -60,12 +60,12 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Before
 public void generateTableName() {
-baseTableName = generateRandomString();
+baseTableName = generateUniqueName();
 }
 
 @Test
 public void noOrder() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -73,7 +73,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void noOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid, code))";
 Object[][] rows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 3}};
 runQueryTest(ddl, upsert("oid", "code"), rows, rows, table);
@@ -81,7 +81,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY ASC)";
 runQueryTest(ddl, "pk", new Object[][]{{"a"}, {"b"}, {"c"}}, new 
Object[][]{{"a"}, {"b"}, {"c"}},
 table);
@@ -89,7 +89,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void ascOrderCompositePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid ASC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -98,7 +98,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 for (String type : new String[]{"CHAR(2)", "VARCHAR"}) {
 String ddl = "CREATE table " + table + " (pk ${type} NOT NULL 
PRIMARY KEY DESC)".replace("${type}", type);
 runQueryTest(ddl, "pk", new Object[][]{{"aa"}, {"bb"}, {"cc"}}, 
new Object[][]{{"cc"}, {"bb"}, {"aa"}},
@@ -108,7 +108,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK1() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o2", 2}, {"o3", 
3}};
 Object[][] expectedRows = new Object[][]{{"o3", 3}, {"o2", 2}, {"o1", 
1}};
@@ -117,7 +117,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void descOrderCompositePK2() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (oid CHAR(2) NOT NULL, code 
INTEGER NOT NULL constraint pk primary key (oid DESC, code DESC))";
 Object[][] insertedRows = new Object[][]{{"o1", 1}, {"o1", 2}, {"o1", 
3}};
 Object[][] expectedRows = new Object[][]{{"o1", 3}, {"o1", 2}, {"o1", 
1}};
@@ -126,7 +126,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void equalityDescInlinePK() throws Exception {
-String table = generateRandomString();
+String table = generateUniqueName();
 String ddl = "CREATE table " + table + " (pk VARCHAR NOT NULL PRIMARY 
KEY DESC)";
 runQueryTest(ddl, upsert("pk"), new Object[][]{{"a"}, {"b"}, {"c"}}, 
new Object[][]{{"b"}}, new WhereCondition("pk", "=", "'b'"),
 table);
@@ -134,7 +134,7 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
 
 @Test
 public void