Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 82fab2233 -> 13a7f97b4


PHOENIX-4275 Use unique table names for ViewIT


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

Branch: refs/heads/4.x-HBase-0.98
Commit: dc2c40bc63eb45e615495d5d2d530e154884e6ed
Parents: 82fab22
Author: James Taylor <[email protected]>
Authored: Tue Oct 3 15:03:03 2017 -0700
Committer: James Taylor <[email protected]>
Committed: Tue Oct 3 15:10:05 2017 -0700

----------------------------------------------------------------------
 .../src/it/java/org/apache/phoenix/end2end/ViewIT.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/dc2c40bc/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java
index 267dbc9..1953f79 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java
@@ -701,15 +701,15 @@ public class ViewIT extends BaseViewIT {
       Properties props = new Properties();
       Connection conn1 = DriverManager.getConnection(getUrl(), props);
       conn1.setAutoCommit(true);
-      String TABLE_NAME="UpdateCacheViewTest"+System.currentTimeMillis();
-      String VIEW_NAME="VIEW_"+System.currentTimeMillis();
+      String tableName=generateUniqueName();
+      String viewName=generateUniqueName();
       conn1.createStatement().execute(
-        "CREATE TABLE "+TABLE_NAME+" (k VARCHAR PRIMARY KEY, v1 VARCHAR, v2 
VARCHAR) UPDATE_CACHE_FREQUENCY=1000000");
-      conn1.createStatement().execute("upsert into "+TABLE_NAME+" values 
('row1', 'value1', 'key1')");
+        "CREATE TABLE "+tableName+" (k VARCHAR PRIMARY KEY, v1 VARCHAR, v2 
VARCHAR) UPDATE_CACHE_FREQUENCY=1000000");
+      conn1.createStatement().execute("upsert into "+tableName+" values 
('row1', 'value1', 'key1')");
       conn1.createStatement().execute(
-        "CREATE VIEW "+VIEW_NAME+" (v43 VARCHAR) AS SELECT * FROM 
"+TABLE_NAME+" WHERE v1 = 'value1'");
+        "CREATE VIEW "+viewName+" (v43 VARCHAR) AS SELECT * FROM "+tableName+" 
WHERE v1 = 'value1'");
       ResultSet rs = conn1.createStatement()
-          .executeQuery("SELECT * FROM "+TABLE_NAME+" WHERE v1 = 'value1'");
+          .executeQuery("SELECT * FROM "+tableName+" WHERE v1 = 'value1'");
       assertTrue(rs.next());
     }
 

Reply via email to