phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sama...@apache.org
Subject [09/52] [abbrv] phoenix git commit: PHOENIX-2822 Tests that extend BaseHBaseManagedTimeIT are very slow(Rahul Gidwani)
Date Mon, 25 Apr 2016 18:52:53 GMT
http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
index 3b3f1d5..0439033 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
@@ -23,13 +23,22 @@ import static org.junit.Assert.assertTrue;
 
 import java.sql.*;
 
+import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
-    private void initTables(Connection conn) throws Exception {
-        String ddl = "CREATE TABLE regions (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],chars CHAR(15)[],double1 DOUBLE,varchar1 VARCHAR,nullcheck INTEGER,chars2 CHAR(15)[])";
+public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeTableReuseIT {
+    private static final String REGIONS = generateRandomString();
+    private static Connection conn = null;
+
+    @BeforeClass
+    public static void initTables() throws Exception {
+        conn = DriverManager.getConnection(getUrl());
+        String ddl = "CREATE TABLE " + REGIONS
+            + " (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],chars CHAR(15)[],double1 DOUBLE,varchar1 VARCHAR,nullcheck INTEGER,chars2 CHAR(15)[])";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO regions(region_name,varchars,integers,doubles,bigints,chars,double1,varchar1,nullcheck,chars2) VALUES('SF Bay Area'," +
+        String dml = "UPSERT INTO " + REGIONS
+            + "(region_name,varchars,integers,doubles,bigints,chars,double1,varchar1,nullcheck,chars2) VALUES('SF Bay Area',"
+            +
                 "ARRAY['2345','46345','23234']," +
                 "ARRAY[2345,46345,23234,456]," +
                 "ARRAY[23.45,46.345,23.234,45.6,5.78]," +
@@ -47,11 +56,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionVarchar1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(varchars, ',','*') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(varchars, ',','*') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2345,46345,23234";
@@ -62,11 +70,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionVarchar2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(varchars, ',') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(varchars, ',') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2345,46345,23234";
@@ -77,11 +84,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionVarchar3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY['hello', 'hello'], ',') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY['hello', 'hello'], ',') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "hello,hello";
@@ -92,11 +98,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInt() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(integers, ',') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(integers, ',') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2345,46345,23234,456";
@@ -107,11 +112,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionDouble1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(doubles, ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(doubles, ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "23.45, 46.345, 23.234, 45.6, 5.78";
@@ -122,11 +126,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionDouble2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[2.3, 4.5], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[2.3, 4.5], ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2.3, 4.5";
@@ -137,11 +140,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionBigint() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(bigints, ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(bigints, ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "12, 34, 56, 78, 910";
@@ -152,11 +154,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionChar1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(chars, ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(chars, ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a   , bbbb, c   , ddd , e   ";
@@ -167,11 +168,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionChar2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(chars2, ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(chars2, ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a   , bbbb, c   , ddd , e   , foo ";
@@ -182,11 +182,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionChar3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(chars2, varchar1) FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(chars2, varchar1) FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a   , bbbb, c   , ddd , e   , foo ";
@@ -197,11 +196,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNestedFunctions1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[integers[1],integers[1]], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[integers[1],integers[1]], ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2345, 2345";
@@ -212,11 +210,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNestedFunctions2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[ARRAY_ELEM(ARRAY[2,4],1),ARRAY_ELEM(ARRAY[2,4],2)], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[ARRAY_ELEM(ARRAY[2,4],1),ARRAY_ELEM(ARRAY[2,4],2)], ', ') FROM "
+                + REGIONS + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "2, 4";
@@ -227,11 +224,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNestedFunctions3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[ARRAY_ELEM(doubles, 1), ARRAY_ELEM(doubles, 1)], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[ARRAY_ELEM(doubles, 1), ARRAY_ELEM(doubles, 1)], ', ') FROM "
+                + REGIONS + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "23.45, 23.45";
@@ -242,11 +238,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNestedFunctions4() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_ELEM(ARRAY_APPEND(ARRAY['abc','bcd'], ARRAY_TO_STRING(ARRAY['a','b'], 'c')), 3) FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_ELEM(ARRAY_APPEND(ARRAY['abc','bcd'], ARRAY_TO_STRING(ARRAY['a','b'], 'c')), 3) FROM "
+                + REGIONS + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "acb";
@@ -257,17 +252,19 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE regions (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String table = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + table + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO regions(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY['hello','world'],','))";
+        String dml = "UPSERT INTO " + table
+            + "(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY['hello','world'],','))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT varchar FROM " + table + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "hello,world";
@@ -278,17 +275,19 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE regions (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String tableName = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO regions(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[3, 4, 5],', '))";
+        String dml = "UPSERT INTO " + tableName
+            + "(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[3, 4, 5],', '))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT varchar FROM " + tableName + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "3, 4, 5";
@@ -299,17 +298,19 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE regions (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String tableName = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO regions(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[3.1, 4.2, 5.5],', '))";
+        String dml = "UPSERT INTO " + tableName
+            + "(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[3.1, 4.2, 5.5],', '))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT varchar FROM " + tableName + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "3.1, 4.2, 5.5";
@@ -320,17 +321,19 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert4() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE regions (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String tableName = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO regions(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[true, false, true],', '))";
+        String dml = "UPSERT INTO " + tableName
+            + "(region_name,varchar) VALUES('SF Bay Area',ARRAY_TO_STRING(ARRAY[true, false, true],', '))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT varchar FROM " + tableName + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "true, false, true";
@@ -341,27 +344,33 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE source (region_name VARCHAR PRIMARY KEY,doubles DOUBLE[])";
+        String source = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
 
-        ddl = "CREATE TABLE target (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String target = generateRandomString();
+        ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO source(region_name,doubles) VALUES('SF Bay Area', ARRAY[5.67, 7.87])";
+        String dml = "UPSERT INTO " + source
+            + "(region_name,doubles) VALUES('SF Bay Area', ARRAY[5.67, 7.87])";
         conn.createStatement().execute(dml);
 
-        dml = "UPSERT INTO source(region_name,doubles) VALUES('SF Bay Area2', ARRAY[9.2, 3.4])";
+        dml = "UPSERT INTO " + source
+            + "(region_name,doubles) VALUES('SF Bay Area2', ARRAY[9.2, 3.4])";
         conn.createStatement().execute(dml);
         conn.commit();
 
-        dml = "UPSERT INTO target(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(doubles, ', ') FROM source";
+        dml =
+            "UPSERT INTO " + target
+                + "(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(doubles, ', ') FROM "
+                + source;
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM target");
+        rs = conn.createStatement().executeQuery("SELECT varchar FROM " + target);
         assertTrue(rs.next());
 
         String expected = "5.67, 7.87";
@@ -375,27 +384,33 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE source (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[])";
+        String source = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
 
-        ddl = "CREATE TABLE target (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String target = generateRandomString();
+        ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO source(region_name,varchars) VALUES('SF Bay Area', ARRAY['hello', '-)'])";
+        String dml = "UPSERT INTO " + source
+            + "(region_name,varchars) VALUES('SF Bay Area', ARRAY['hello', '-)'])";
         conn.createStatement().execute(dml);
 
-        dml = "UPSERT INTO source(region_name,varchars) VALUES('SF Bay Area2', ARRAY['hello', '-('])";
+        dml = "UPSERT INTO " + source
+            + "(region_name,varchars) VALUES('SF Bay Area2', ARRAY['hello', '-('])";
         conn.createStatement().execute(dml);
         conn.commit();
 
-        dml = "UPSERT INTO target(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(varchars, ':') FROM source";
+        dml =
+            "UPSERT INTO " + target
+                + "(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(varchars, ':') FROM "
+                + source;
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM target");
+        rs = conn.createStatement().executeQuery("SELECT varchar FROM " + target);
         assertTrue(rs.next());
 
         String expected = "hello:-)";
@@ -409,27 +424,33 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-
-        String ddl = "CREATE TABLE source (region_name VARCHAR PRIMARY KEY,booleans BOOLEAN[])";
+        String source = generateRandomString();
+        String ddl =
+            "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY KEY,booleans BOOLEAN[])";
         conn.createStatement().execute(ddl);
 
-        ddl = "CREATE TABLE target (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
+        String target = generateRandomString();
+        ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
-        String dml = "UPSERT INTO source(region_name, booleans) VALUES('SF Bay Area', ARRAY[true, true])";
+        String dml = "UPSERT INTO " + source
+            + "(region_name, booleans) VALUES('SF Bay Area', ARRAY[true, true])";
         conn.createStatement().execute(dml);
 
-        dml = "UPSERT INTO source(region_name, booleans) VALUES('SF Bay Area2', ARRAY[false, false])";
+        dml = "UPSERT INTO " + source
+            + "(region_name, booleans) VALUES('SF Bay Area2', ARRAY[false, false])";
         conn.createStatement().execute(dml);
         conn.commit();
 
-        dml = "UPSERT INTO target(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(booleans, ', ') FROM source";
+        dml =
+            "UPSERT INTO " + target
+                + "(region_name, varchar) SELECT region_name, ARRAY_TO_STRING(booleans, ', ') FROM "
+                + source;
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT varchar FROM target");
+        rs = conn.createStatement().executeQuery("SELECT varchar FROM " + target);
         assertTrue(rs.next());
 
         String expected = "true, true";
@@ -443,11 +464,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE '2345,46345,23234,456' = ARRAY_TO_STRING(integers,',')");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE '2345,46345,23234,456' = ARRAY_TO_STRING(integers,',')");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -456,11 +475,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE 'a,b,c' = ARRAY_TO_STRING(ARRAY['a', 'b', 'c'], ',')");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE 'a,b,c' = ARRAY_TO_STRING(ARRAY['a', 'b', 'c'], ',')");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -469,11 +486,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE '1.1,2.2,3.3' = ARRAY_TO_STRING(ARRAY[1.1, 2.2, 3.3], ',')");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE '1.1,2.2,3.3' = ARRAY_TO_STRING(ARRAY[1.1, 2.2, 3.3], ',')");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -482,11 +497,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere4() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE 'true,true,true' = ARRAY_TO_STRING(ARRAY[true, true, true], ',')");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE 'true,true,true' = ARRAY_TO_STRING(ARRAY[true, true, true], ',')");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -495,11 +508,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere5() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
 
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE 'a, bbbb, c, ddd, e' = ARRAY_TO_STRING(ARRAY['a', 'bbbb', 'c' , 'ddd', 'e'], ', ')");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE 'a, bbbb, c, ddd, e' = ARRAY_TO_STRING(ARRAY['a', 'bbbb', 'c' , 'ddd', 'e'], ', ')");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -508,11 +520,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere6() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE ARRAY_TO_STRING(ARRAY[1,2,3], varchar1) = '1, 2, 3'");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE ARRAY_TO_STRING(ARRAY[1,2,3], varchar1) = '1, 2, 3'");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -521,11 +531,9 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionInWhere7() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT region_name FROM regions WHERE ARRAY_TO_STRING(varchars, varchar1) = '2345, 46345, 23234'");
+        rs = conn.createStatement().executeQuery("SELECT region_name FROM " + REGIONS
+            + " WHERE ARRAY_TO_STRING(varchars, varchar1) = '2345, 46345, 23234'");
         assertTrue(rs.next());
 
         assertEquals("SF Bay Area", rs.getString(1));
@@ -534,11 +542,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls1() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY['a', NULL, 'b'], ', ','*') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY['a', NULL, 'b'], ', ','*') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, *, b";
@@ -549,11 +556,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls2() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY['a', NULL, 'b'], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY['a', NULL, 'b'], ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, b";
@@ -564,11 +570,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls3() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[NULL, 'a', 'b'], ', ', '*') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[NULL, 'a', 'b'], ', ', '*') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "*, a, b";
@@ -579,11 +584,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls4() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[NULL, 'a', 'b'], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[NULL, 'a', 'b'], ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, b";
@@ -594,11 +598,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls5() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY['a', 'b', NULL], ', ', '*') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY['a', 'b', NULL], ', ', '*') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, b, *";
@@ -609,11 +612,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls6() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY['a', 'b', NULL], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY['a', 'b', NULL], ', ') FROM " + REGIONS
+                + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, b";
@@ -624,11 +626,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls7() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[NULL, NULL, 'a', 'b', NULL, 'c', 'd', NULL, 'e', NULL, NULL], ', ', '*') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[NULL, NULL, 'a', 'b', NULL, 'c', 'd', NULL, 'e', NULL, NULL], ', ', '*') FROM "
+                + REGIONS + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "*, *, a, b, *, c, d, *, e, *, *";
@@ -639,11 +640,10 @@ public class ArrayToStringFunctionIT extends BaseHBaseManagedTimeIT {
 
     @Test
     public void testArrayToStringFunctionWithNulls8() throws Exception {
-        Connection conn = DriverManager.getConnection(getUrl());
-        initTables(conn);
-
         ResultSet rs;
-        rs = conn.createStatement().executeQuery("SELECT ARRAY_TO_STRING(ARRAY[NULL, NULL, 'a', 'b', NULL, 'c', 'd', NULL, 'e', NULL, NULL], ', ') FROM regions WHERE region_name = 'SF Bay Area'");
+        rs = conn.createStatement().executeQuery(
+            "SELECT ARRAY_TO_STRING(ARRAY[NULL, NULL, 'a', 'b', NULL, 'c', 'd', NULL, 'e', NULL, NULL], ', ') FROM "
+                + REGIONS + " WHERE region_name = 'SF Bay Area'");
         assertTrue(rs.next());
 
         String expected = "a, b, c, d, e";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
index e95a386..5444e7f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
@@ -26,18 +26,21 @@ import org.apache.phoenix.schema.types.PTimestamp;
 import org.apache.phoenix.schema.types.PhoenixArray;
 import org.junit.Test;
 
-public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
+public class ArraysWithNullsIT extends BaseHBaseManagedTimeTableReuseIT {
 
     @Test
     public void testArrayUpsertIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t1 ( k VARCHAR PRIMARY KEY, a INTEGER[])");
+        String t1 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t1 + " ( k VARCHAR PRIMARY KEY, a INTEGER[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t1 VALUES('a',ARRAY[null,3,null])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t1 + " VALUES('a',ARRAY[null,3,null])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t1 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t1 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("INTEGER",new Object[]{null,3,null});
 
@@ -51,13 +54,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertVarcharWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t2 ( k VARCHAR PRIMARY KEY, a VARCHAR[])");
+        String t2 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t2 + " ( k VARCHAR PRIMARY KEY, a VARCHAR[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t2 VALUES('a',ARRAY['10',null])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t2 + " VALUES('a',ARRAY['10',null])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t2 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t2 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("VARCHAR",new Object[]{"10",null});
 
@@ -69,13 +75,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertBigIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t3 ( k VARCHAR PRIMARY KEY, a BIGINT[])");
+        String t3 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t3 + " ( k VARCHAR PRIMARY KEY, a BIGINT[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t3 VALUES('a',ARRAY[2,null,32335,4])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t3 + " VALUES('a',ARRAY[2,null,32335,4])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t3 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t3 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("BIGINT",new Object[]{(long)2,null,(long)32335,(long)4});
 
@@ -87,13 +96,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertFloatWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t4 ( k VARCHAR PRIMARY KEY, a FLOAT[])");
+        String t4 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t4 + " ( k VARCHAR PRIMARY KEY, a FLOAT[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t4 VALUES('a',ARRAY[1.1,2.2,null,3.4])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t4 + " VALUES('a',ARRAY[1.1,2.2,null,3.4])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t4 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t4 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("FLOAT",new Object[]{(float)1.1,(float)2.2,null,(float)3.4});
 
@@ -105,13 +117,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertSmallIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t5 ( k VARCHAR PRIMARY KEY, a SMALLINT[])");
+        String t5 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t5 + " ( k VARCHAR PRIMARY KEY, a SMALLINT[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t5 VALUES('a',ARRAY[123,456,null,456])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t5 + " VALUES('a',ARRAY[123,456,null,456])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t5 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t5 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("SMALLINT",new Object[]{(short)123,(short)456,null,(short)456});
 
@@ -123,13 +138,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertTinyIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t6 ( k VARCHAR PRIMARY KEY, a TINYINT[])");
+        String t6 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t6 + " ( k VARCHAR PRIMARY KEY, a TINYINT[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t6 VALUES('a',ARRAY[123,45,null,45])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t6 + " VALUES('a',ARRAY[123,45,null,45])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t6 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t6 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("TINYINT",new Object[]{(byte)123,(byte)45,null,(byte)45});
 
@@ -141,13 +159,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertBooleanWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t7 ( k VARCHAR PRIMARY KEY, a BOOLEAN[])");
+        String t7 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t7 + " ( k VARCHAR PRIMARY KEY, a BOOLEAN[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t7 VALUES('a',ARRAY[true,false,null,true])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t7 + " VALUES('a',ARRAY[true,false,null,true])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t7 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t7 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("BOOLEAN",new Object[]{true,false,null,true});
 
@@ -159,13 +180,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertDoubleWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t8 ( k VARCHAR PRIMARY KEY, a DOUBLE[])");
+        String t8 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t8 + " ( k VARCHAR PRIMARY KEY, a DOUBLE[])");
 
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t8 VALUES('a',ARRAY[1.2,2.3,null,3.4])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t8 + " VALUES('a',ARRAY[1.2,2.3,null,3.4])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t8 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t8 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("DOUBLE",new Object[]{1.2,2.3,null,3.4});
 
@@ -177,12 +201,14 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertDateWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t9 ( k VARCHAR PRIMARY KEY, a DATE[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t9 VALUES('a',ARRAY[TO_DATE('2015-05-20 06:12:14.184'),null,TO_DATE('2015-05-20 06:12:14.184'),null])");
+        String t9 = generateRandomString();
+        conn.createStatement().execute("CREATE TABLE " + t9 + " ( k VARCHAR PRIMARY KEY, a DATE[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t9
+            + " VALUES('a',ARRAY[TO_DATE('2015-05-20 06:12:14.184'),null,TO_DATE('2015-05-20 06:12:14.184'),null])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t9 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery("Select a from " + t9 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("DATE",new Date[]{new Date(1432102334184l),new Date(0l),new Date(1432102334184l),new Date(0l)});
 
@@ -193,12 +219,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertDateWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t10 ( k VARCHAR PRIMARY KEY, a DATE[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t10 VALUES('a',ARRAY[TO_DATE('1970-01-01 00:00:00.000'), TO_DATE('2015-05-20 06:12:14.184'),TO_DATE('2015-05-20 06:12:14.184')])");
+        String t10 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t10 + " ( k VARCHAR PRIMARY KEY, a DATE[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t10
+            + " VALUES('a',ARRAY[TO_DATE('1970-01-01 00:00:00.000'), TO_DATE('2015-05-20 06:12:14.184'),TO_DATE('2015-05-20 06:12:14.184')])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t10 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t10 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("DATE",new Date[]{new Date(0l), new Date(1432102334184l), new Date(1432102334184l)});
 
@@ -209,12 +239,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertTimeWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t11 ( k VARCHAR PRIMARY KEY, a TIME[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t11 VALUES('a',ARRAY[TO_TIME('2015-05-20 06:12:14.184'),null,TO_TIME('2015-05-20 06:12:14.184'),null])");
+        String t11 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t11 + " ( k VARCHAR PRIMARY KEY, a TIME[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t11
+            + " VALUES('a',ARRAY[TO_TIME('2015-05-20 06:12:14.184'),null,TO_TIME('2015-05-20 06:12:14.184'),null])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t11 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t11 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("TIME",new Time[]{new Time(1432102334184l),new Time(0l),new Time(1432102334184l),new Time(0l)});
 
@@ -225,12 +259,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertTimeWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t12 ( k VARCHAR PRIMARY KEY, a TIME[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t12 VALUES('a',ARRAY[TO_TIME('1970-01-01 00:00:00.000'), TO_TIME('2015-05-20 06:12:14.184'),null,TO_TIME('2015-05-20 06:12:14.184'),null])");
+        String t12 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t12 + " ( k VARCHAR PRIMARY KEY, a TIME[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t12
+            + " VALUES('a',ARRAY[TO_TIME('1970-01-01 00:00:00.000'), TO_TIME('2015-05-20 06:12:14.184'),null,TO_TIME('2015-05-20 06:12:14.184'),null])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t12 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t12 + " where k = 'a'");
         rs.next();
         Array array = conn.createArrayOf("TIME",new Time[]{new Time(0l),new Time(1432102334184l),new Time(0l),new Time(1432102334184l),new Time(0l)});
 
@@ -241,12 +279,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertTimeStampWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t13 ( k VARCHAR PRIMARY KEY, a TIMESTAMP[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t13 VALUES('a',ARRAY[TO_TIMESTAMP('2015-05-20 06:12:14.184'),null,TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000')])");
+        String t13 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t13 + " ( k VARCHAR PRIMARY KEY, a TIMESTAMP[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t13
+            + " VALUES('a',ARRAY[TO_TIMESTAMP('2015-05-20 06:12:14.184'),null,TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000')])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t13 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t13 + " where k = 'a'");
         rs.next();
 
         assertEquals(rs.getArray(1),conn.createArrayOf("TIMESTAMP",new Timestamp[]{new Timestamp(1432102334184l),new Timestamp(0l),new Timestamp(1432102334184l),new Timestamp(0l)}));
@@ -256,12 +298,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertTimeStampWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t14 ( k VARCHAR PRIMARY KEY, a TIMESTAMP[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t14 VALUES('a',ARRAY[TO_TIMESTAMP('1970-01-01 00:00:00.000'),TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000'),TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000')])");
+        String t14 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t14 + " ( k VARCHAR PRIMARY KEY, a TIMESTAMP[])");
+        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t14
+            + " VALUES('a',ARRAY[TO_TIMESTAMP('1970-01-01 00:00:00.000'),TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000'),TO_TIMESTAMP('2015-05-20 06:12:14.184'),TO_TIMESTAMP('1970-01-01 00:00:00.000')])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t14 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t14 + " where k = 'a'");
         rs.next();
 
         assertEquals(rs.getArray(1),conn.createArrayOf("TIMESTAMP",new Timestamp[]{new Timestamp(0l),new Timestamp(1432102334184l),new Timestamp(0l),new Timestamp(1432102334184l),new Timestamp(0l)}));
@@ -271,12 +317,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertCharWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t15 ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t15 VALUES('a',ARRAY['foo',null,'fo','foo'])");
+        String t15 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t15 + " ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t15 + " VALUES('a',ARRAY['foo',null,'fo','foo'])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t15 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t15 + " where k = 'a'");
         rs.next();
 
         assertEquals(rs.getArray(1),conn.createArrayOf("CHAR",new String[]{"foo","","fo","foo"}));
@@ -286,12 +336,16 @@ public class ArraysWithNullsIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testArrayUpsertCharWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        conn.createStatement().execute("CREATE TABLE t16 ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO t16 VALUES('a',ARRAY[null,'foo',null,'fo','foo'])");
+        String t16 = generateRandomString();
+        conn.createStatement().execute(
+            "CREATE TABLE " + t16 + " ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + t16 + " VALUES('a',ARRAY[null,'foo',null,'fo','foo'])");
         stmt.execute();
         conn.commit();
 
-        ResultSet rs = conn.createStatement().executeQuery("Select a from t16 where k = 'a'");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "Select a from " + t16 + " where k = 'a'");
         rs.next();
 
         assertEquals(rs.getArray(1),conn.createArrayOf("CHAR",new String[]{"","foo","","fo","foo"}));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
index 469f2de..3797884 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
@@ -32,7 +32,7 @@ import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
 
 
-public class AutoCommitIT extends BaseHBaseManagedTimeIT {
+public class AutoCommitIT extends BaseHBaseManagedTimeTableReuseIT {
 
     @Test
     public void testMutationJoin() throws Exception {
@@ -40,42 +40,43 @@ public class AutoCommitIT extends BaseHBaseManagedTimeIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(true);
-        
-        String ddl = "CREATE TABLE test_table " +
+
+            String testTable = generateRandomString();
+            String ddl = "CREATE TABLE " + testTable + " " +
                 "  (r varchar not null, col1 integer" +
                 "  CONSTRAINT pk PRIMARY KEY (r))\n";
         createTestTable(getUrl(), ddl);
         
-        String query = "UPSERT INTO test_table(r, col1) VALUES('row1', 1)";
+        String query = "UPSERT INTO " + testTable + "(r, col1) VALUES('row1', 1)";
         PreparedStatement statement = conn.prepareStatement(query);
         statement.executeUpdate();
         conn.commit();
         
         conn.setAutoCommit(false);
-        query = "UPSERT INTO test_table(r, col1) VALUES('row1', 2)";
+        query = "UPSERT INTO " + testTable + "(r, col1) VALUES('row1', 2)";
         statement = conn.prepareStatement(query);
         statement.executeUpdate();
         
-        query = "DELETE FROM test_table WHERE r='row1'";
+        query = "DELETE FROM " + testTable + " WHERE r='row1'";
         statement = conn.prepareStatement(query);
         statement.executeUpdate();
         conn.commit();
         
-        query = "SELECT * FROM test_table";
+        query = "SELECT * FROM " + testTable;
         statement = conn.prepareStatement(query);
         ResultSet rs = statement.executeQuery();
         assertFalse(rs.next());
 
-        query = "DELETE FROM test_table WHERE r='row1'";
+        query = "DELETE FROM " + testTable + " WHERE r='row1'";
         statement = conn.prepareStatement(query);
         statement.executeUpdate();
 
-        query = "UPSERT INTO test_table(r, col1) VALUES('row1', 3)";
+        query = "UPSERT INTO " + testTable + "(r, col1) VALUES('row1', 3)";
         statement = conn.prepareStatement(query);
         statement.executeUpdate();
         conn.commit();
         
-        query = "SELECT * FROM test_table";
+        query = "SELECT * FROM " + testTable;
         statement = conn.prepareStatement(query);
         rs = statement.executeQuery();
         assertTrue(rs.next());

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeIT.java
index 679f29d..3a811a8 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeIT.java
@@ -34,7 +34,10 @@ import org.junit.experimental.categories.Category;
  * to set timestamps, because we create/destroy the Phoenix tables
  * between tests and only allow a table time stamp to increase.
  * Without this separation table deletion/creation would fail.
- * 
+ *
+ * Try and use (@link BaseHBaseManagedTimeTableReuseIT) and only
+ * extend this class if really necessary.  It is very slow as
+ * we have to delete tables which takes up to 10 seconds per test case.
  * All tests extending this class use the mini cluster that is
  * different from the mini cluster used by test classes extending 
  * {@link BaseClientManagedTimeIT}.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeTableReuseIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeTableReuseIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeTableReuseIT.java
new file mode 100644
index 0000000..8d9fff9
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseHBaseManagedTimeTableReuseIT.java
@@ -0,0 +1,56 @@
+package org.apache.phoenix.end2end;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+import javax.annotation.concurrent.NotThreadSafe;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * Base class for tests that let HBase set timestamps.
+ * We need to separate these from tests that rely on clients
+ * to set timestamps, because we create/destroy the Phoenix tables
+ * between tests and only allow a table time stamp to increase.
+ * Without this separation table deletion/creation would fail.
+ *
+ * All tests extending this class use the mini cluster that is
+ * shared by all classes extending this class
+ *
+ * Remember to use BaseTest.generateRandomString() to generate table
+ * names for your tests otherwise there might be naming collisions between
+ * other tests.
+ * {@link BaseClientManagedTimeIT}.
+ *
+ * @since 0.1
+ */
+@NotThreadSafe
+@Category(HBaseManagedTimeTest.class)
+public class BaseHBaseManagedTimeTableReuseIT extends BaseTest {
+
+  protected static Configuration getTestClusterConfig() {
+    // don't want callers to modify config.
+    return new Configuration(config);
+  }
+
+  @BeforeClass
+  public static void doSetup() throws Exception {
+    setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+  }
+
+  @AfterClass
+  public static void doTeardown() throws Exception {
+    // no teardown since we are creating unique table names
+  }
+
+  @After
+  public void cleanUpAfterTest() throws Exception {
+    // no cleanup since we are using unique table names
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
index a632104..25fc43f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
@@ -28,26 +28,31 @@ import java.sql.ResultSet;
 
 import org.apache.phoenix.expression.function.CbrtFunction;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
  * End to end tests for {@link CbrtFunction}
  */
-public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
+public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeTableReuseIT {
 
     private static final String KEY = "key";
     private static final double ZERO = 1e-8;
+    private static final String TEST_SIGNED = generateRandomString();
+    private static final String TEST_UNSIGNED = generateRandomString();
 
-    @Before
-    public void initTable() throws Exception {
+    @BeforeClass
+    public static void initTable() throws Exception {
         Connection conn = null;
         PreparedStatement stmt = null;
         try {
             conn = DriverManager.getConnection(getUrl());
             String ddl;
-            ddl = "CREATE TABLE testSigned (k VARCHAR NOT NULL PRIMARY KEY, doub DOUBLE, fl FLOAT, inte INTEGER, lon BIGINT, smalli SMALLINT, tinyi TINYINT)";
+            ddl = "CREATE TABLE " + TEST_SIGNED
+                + " (k VARCHAR NOT NULL PRIMARY KEY, doub DOUBLE, fl FLOAT, inte INTEGER, lon BIGINT, smalli SMALLINT, tinyi TINYINT)";
             conn.createStatement().execute(ddl);
-            ddl = "CREATE TABLE testUnsigned (k VARCHAR NOT NULL PRIMARY KEY, doub UNSIGNED_DOUBLE, fl UNSIGNED_FLOAT, inte UNSIGNED_INT, lon UNSIGNED_LONG, smalli UNSIGNED_SMALLINT, tinyi UNSIGNED_TINYINT)";
+            ddl = "CREATE TABLE " + TEST_UNSIGNED
+                + " (k VARCHAR NOT NULL PRIMARY KEY, doub UNSIGNED_DOUBLE, fl UNSIGNED_FLOAT, inte UNSIGNED_INT, lon UNSIGNED_LONG, smalli UNSIGNED_SMALLINT, tinyi UNSIGNED_TINYINT)";
             conn.createStatement().execute(ddl);
             conn.commit();
         } finally {
@@ -56,7 +61,8 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
     }
 
     private void updateSignedTable(Connection conn, double data) throws Exception {
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO testSigned VALUES (?, ?, ?, ?, ?, ?, ?)");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + TEST_SIGNED + " VALUES (?, ?, ?, ?, ?, ?, ?)");
         stmt.setString(1, KEY);
         Double d = Double.valueOf(data);
         stmt.setDouble(2, d.doubleValue());
@@ -70,7 +76,8 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
     }
 
     private void updateUnsignedTable(Connection conn, double data) throws Exception {
-        PreparedStatement stmt = conn.prepareStatement("UPSERT INTO testUnsigned VALUES (?, ?, ?, ?, ?, ?, ?)");
+        PreparedStatement stmt = conn.prepareStatement(
+            "UPSERT INTO " + TEST_UNSIGNED + " VALUES (?, ?, ?, ?, ?, ?, ?)");
         stmt.setString(1, KEY);
         Double d = Double.valueOf(data);
         stmt.setDouble(2, d.doubleValue());
@@ -85,7 +92,9 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
 
     private void testSignedNumberSpec(Connection conn, double data) throws Exception {
         updateSignedTable(conn, data);
-        ResultSet rs = conn.createStatement().executeQuery("SELECT CBRT(doub),CBRT(fl),CBRT(inte),CBRT(lon),CBRT(smalli),CBRT(tinyi) FROM testSigned");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "SELECT CBRT(doub),CBRT(fl),CBRT(inte),CBRT(lon),CBRT(smalli),CBRT(tinyi) FROM "
+                + TEST_SIGNED);
         assertTrue(rs.next());
         Double d = Double.valueOf(data);
         assertTrue(Math.abs(rs.getDouble(1) - Math.cbrt(d.doubleValue())) < ZERO);
@@ -95,7 +104,8 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
         assertTrue(Math.abs(rs.getDouble(5) - Math.cbrt(d.shortValue())) < ZERO);
         assertTrue(Math.abs(rs.getDouble(6) - Math.cbrt(d.byteValue())) < ZERO);
         assertTrue(!rs.next());
-        PreparedStatement stmt = conn.prepareStatement("SELECT k FROM testSigned WHERE CBRT(doub)>0 AND CBRT(fl)>0 AND CBRT(inte)>0 AND CBRT(lon)>0 AND CBRT(smalli)>0 AND CBRT(tinyi)>0");
+        PreparedStatement stmt = conn.prepareStatement("SELECT k FROM " + TEST_SIGNED
+            + " WHERE CBRT(doub)>0 AND CBRT(fl)>0 AND CBRT(inte)>0 AND CBRT(lon)>0 AND CBRT(smalli)>0 AND CBRT(tinyi)>0");
         rs = stmt.executeQuery();
         if (data > 0) {
             assertTrue(rs.next());
@@ -106,7 +116,9 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
 
     private void testUnsignedNumberSpec(Connection conn, double data) throws Exception {
         updateUnsignedTable(conn, data);
-        ResultSet rs = conn.createStatement().executeQuery("SELECT CBRT(doub),CBRT(fl),CBRT(inte),CBRT(lon),CBRT(smalli),CBRT(tinyi) FROM testUnsigned");
+        ResultSet rs = conn.createStatement().executeQuery(
+            "SELECT CBRT(doub),CBRT(fl),CBRT(inte),CBRT(lon),CBRT(smalli),CBRT(tinyi) FROM "
+                + TEST_UNSIGNED);
         assertTrue(rs.next());
         Double d = Double.valueOf(data);
         assertTrue(Math.abs(rs.getDouble(1) - Math.cbrt(d.doubleValue())) < ZERO);
@@ -116,7 +128,8 @@ public class CbrtFunctionEnd2EndIT extends BaseHBaseManagedTimeIT {
         assertTrue(Math.abs(rs.getDouble(5) - Math.cbrt(d.shortValue())) < ZERO);
         assertTrue(Math.abs(rs.getDouble(6) - Math.cbrt(d.byteValue())) < ZERO);
         assertTrue(!rs.next());
-        PreparedStatement stmt = conn.prepareStatement("SELECT k FROM testUnsigned WHERE CBRT(doub)>0 AND CBRT(fl)>0 AND CBRT(inte)>0 AND CBRT(lon)>0 AND CBRT(smalli)>0 AND CBRT(tinyi)>0");
+        PreparedStatement stmt = conn.prepareStatement("SELECT k FROM " + TEST_UNSIGNED
+            + " WHERE CBRT(doub)>0 AND CBRT(fl)>0 AND CBRT(inte)>0 AND CBRT(lon)>0 AND CBRT(smalli)>0 AND CBRT(tinyi)>0");
         rs = stmt.executeQuery();
         if (data > 0) {
             assertTrue(rs.next());

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
index f415dc6..6f09c45 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
@@ -34,19 +34,23 @@ import org.junit.Test;
  *
  */
 
-public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
+public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeTableReuseIT {
 
     @Test
     public void testConvertTimezoneEurope() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
+        String dml = "UPSERT INTO " + timezone_offset_test
+            + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs = conn.createStatement().executeQuery(
-                "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'Europe/Prague') FROM TIMEZONE_OFFSET_TEST");
+            "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'Europe/Prague') FROM "
+                + timezone_offset_test);
 
         assertTrue(rs.next());
         assertEquals(1393635600000L, rs.getDate(3).getTime()); //Sat, 01 Mar 2014 01:00:00
@@ -55,14 +59,18 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
     @Test
     public void testConvertTimezoneAmerica() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
+        String dml = "UPSERT INTO " + timezone_offset_test
+            + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs = conn.createStatement().executeQuery(
-                "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM TIMEZONE_OFFSET_TEST");
+            "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM "
+                + timezone_offset_test);
 
         assertTrue(rs.next());
         assertEquals(1393596000000L, rs.getDate(3).getTime()); //Fri, 28 Feb 2014 14:00:00
@@ -71,14 +79,17 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
     @Test
     public void nullInDateParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1) VALUES (1)";
+        String dml = "UPSERT INTO " + timezone_offset_test + " (k1) VALUES (1)";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs = conn.createStatement().executeQuery(
-                "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM TIMEZONE_OFFSET_TEST");
+            "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM "
+                + timezone_offset_test);
 
         assertTrue(rs.next());
         rs.getDate(3);
@@ -88,14 +99,17 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
     @Test
     public void nullInFirstTimezoneParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
+        String dml = "UPSERT INTO " + timezone_offset_test
+            + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs = conn.createStatement().executeQuery(
-                "SELECT k1, dates, CONVERT_TZ(dates, tz, 'America/Adak') FROM TIMEZONE_OFFSET_TEST");
+            "SELECT k1, dates, CONVERT_TZ(dates, tz, 'America/Adak') FROM " + timezone_offset_test);
 
         assertTrue(rs.next());
         rs.getDate(3);
@@ -105,14 +119,17 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
     @Test
     public void nullInSecondTimezoneParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
+        String dml = "UPSERT INTO " + timezone_offset_test
+            + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         ResultSet rs = conn.createStatement().executeQuery(
-                "SELECT k1, dates, CONVERT_TZ(dates, 'America/Adak', tz) FROM TIMEZONE_OFFSET_TEST");
+            "SELECT k1, dates, CONVERT_TZ(dates, 'America/Adak', tz) FROM " + timezone_offset_test);
 
         assertTrue(rs.next());
         rs.getDate(3);
@@ -122,15 +139,19 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
     @Test
     public void unknownTimezone() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
+        String timezone_offset_test = generateRandomString();
+        String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+            + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
-        String dml = "UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
+        String dml = "UPSERT INTO " + timezone_offset_test
+            + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))";
         conn.createStatement().execute(dml);
         conn.commit();
 
         try {
             ResultSet rs = conn.createStatement().executeQuery(
-                    "SELECT k1, dates, CONVERT_TZ(dates, 'UNKNOWN_TIMEZONE', 'America/Adak') FROM TIMEZONE_OFFSET_TEST");
+                "SELECT k1, dates, CONVERT_TZ(dates, 'UNKNOWN_TIMEZONE', 'America/Adak') FROM "
+                    + timezone_offset_test);
 
             rs.next();
             rs.getDate(3).getTime();
@@ -143,15 +164,19 @@ public class ConvertTimezoneFunctionIT extends BaseHBaseManagedTimeIT {
 	@Test
 	public void testConvertMultipleRecords() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String ddl = "CREATE TABLE IF NOT EXISTS TIMEZONE_OFFSET_TEST (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
+      String timezone_offset_test = generateRandomString();
+      String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
+          + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
 		Statement stmt = conn.createStatement();
 		stmt.execute(ddl);
-		stmt.execute("UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))");
-		stmt.execute("UPSERT INTO TIMEZONE_OFFSET_TEST (k1, dates) VALUES (2, TO_DATE('2014-03-01 00:00:00'))");
+		stmt.execute("UPSERT INTO " + timezone_offset_test
+        + " (k1, dates) VALUES (1, TO_DATE('2014-03-01 00:00:00'))");
+		stmt.execute("UPSERT INTO " + timezone_offset_test
+        + " (k1, dates) VALUES (2, TO_DATE('2014-03-01 00:00:00'))");
 		conn.commit();
 
 		ResultSet rs = stmt.executeQuery(
-				"SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM TIMEZONE_OFFSET_TEST");
+        "SELECT k1, dates, CONVERT_TZ(dates, 'UTC', 'America/Adak') FROM " + timezone_offset_test);
 
 		assertTrue(rs.next());
 		assertEquals(1393596000000L, rs.getDate(3).getTime()); //Fri, 28 Feb 2014 14:00:00

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ecc5ff2d/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
index 93205a7..041649b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
@@ -35,16 +35,19 @@ import org.apache.phoenix.schema.types.PUnsignedLong;
 import org.junit.Test;
 
 
-public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
+public class DecodeFunctionIT extends BaseHBaseManagedTimeTableReuseIT {
 
 	@Test
 	public void shouldPass() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
 
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
-		PreparedStatement ps = conn.prepareStatement("UPSERT INTO test_table (some_column) VALUES (?)");
+		PreparedStatement ps = conn.prepareStatement(
+				"UPSERT INTO " + testTable + " (some_column) VALUES (?)");
 
 		byte[] kk = Bytes.add(PUnsignedLong.INSTANCE.toBytes(2232594215l), PInteger.INSTANCE.toBytes(-8));
 		ps.setBytes(1, kk);
@@ -52,7 +55,8 @@ public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
 		ps.execute();
 		conn.commit();
 
-		ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('000000008512af277ffffff8', 'hex')");
+		ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM " + testTable
+				+ " WHERE some_column = DECODE('000000008512af277ffffff8', 'hex')");
 		assertTrue(rs.next());
 	}
 
@@ -60,10 +64,13 @@ public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
 	public void upperCaseHexEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
 
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
-		PreparedStatement ps = conn.prepareStatement("UPSERT INTO test_table (some_column) VALUES (?)");
+		PreparedStatement ps = conn.prepareStatement(
+				"UPSERT INTO " + testTable + " (some_column) VALUES (?)");
 
 		byte[] kk = Bytes.add(PUnsignedLong.INSTANCE.toBytes(2232594215l), PInteger.INSTANCE.toBytes(-8));
 		ps.setBytes(1, kk);
@@ -71,19 +78,23 @@ public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
 		ps.execute();
 		conn.commit();
 
-		ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('000000008512af277ffffff8', 'HEX')");
+		ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM " + testTable
+				+ " WHERE some_column = DECODE('000000008512af277ffffff8', 'HEX')");
 		assertTrue(rs.next());
 	}
 
 	@Test
 	public void invalidCharacters() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
 
 		try {
-			conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('zzxxuuyyzzxxuuyy', 'hex')");
+			conn.createStatement().executeQuery(
+					"SELECT * FROM " + testTable + " WHERE some_column = DECODE('zzxxuuyyzzxxuuyy', 'hex')");
 	        fail();
 		} catch (SQLException e) {
 			assertEquals(SQLExceptionCode.ILLEGAL_DATA.getErrorCode(), e.getErrorCode());
@@ -93,12 +104,15 @@ public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
 	@Test
 	public void invalidLength() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
 
 		try {
-			conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('8', 'hex')");
+			conn.createStatement().executeQuery(
+					"SELECT * FROM " + testTable + " WHERE some_column = DECODE('8', 'hex')");
             fail();
         } catch (SQLException e) {
             assertEquals(SQLExceptionCode.ILLEGAL_DATA.getErrorCode(), e.getErrorCode());
@@ -108,23 +122,28 @@ public class DecodeFunctionIT extends BaseHBaseManagedTimeIT {
 	@Test
 	public void nullEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
 
-		ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('8', NULL)");
+		ResultSet rs = conn.createStatement().executeQuery(
+				"SELECT * FROM " + testTable + " WHERE some_column = DECODE('8', NULL)");
 		assertFalse(rs.next());
 	}
 
 	@Test
 	public void invalidEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String ddl = "CREATE TABLE test_table ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
+		String testTable = generateRandomString();
+		String ddl = "CREATE TABLE " + testTable
+				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
 		conn.createStatement().execute(ddl);
 
 		try {
-			conn.createStatement().executeQuery("SELECT * FROM test_table WHERE some_column = DECODE('8', 'someNonexistFormat')");
+			conn.createStatement().executeQuery("SELECT * FROM "+ testTable + " WHERE some_column = DECODE('8', 'someNonexistFormat')");
             fail();
         } catch (SQLException e) {
             assertEquals(SQLExceptionCode.TYPE_MISMATCH.getErrorCode(), e.getErrorCode());


Mime
View raw message