phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject git commit: Modify unit test to repro former issue not surfaced due to caching
Date Thu, 27 Feb 2014 05:02:21 GMT
Repository: incubator-phoenix
Updated Branches:
  refs/heads/master 31c322c60 -> b6a6787f7


Modify unit test to repro former issue not surfaced due to caching


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

Branch: refs/heads/master
Commit: b6a6787f74d7f81f2b382e230826b7d439c52392
Parents: 31c322c
Author: James Taylor <jamestaylor@apache.org>
Authored: Wed Feb 26 21:02:14 2014 -0800
Committer: James Taylor <jamestaylor@apache.org>
Committed: Wed Feb 26 21:02:14 2014 -0800

----------------------------------------------------------------------
 .../src/test/java/org/apache/phoenix/end2end/ViewTest.java   | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/b6a6787f/phoenix-core/src/test/java/org/apache/phoenix/end2end/ViewTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/end2end/ViewTest.java b/phoenix-core/src/test/java/org/apache/phoenix/end2end/ViewTest.java
index faded93..b82506c 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/end2end/ViewTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/end2end/ViewTest.java
@@ -35,6 +35,7 @@ public class ViewTest extends BaseViewTest {
     
     @Test
     public void testReadOnlyView() throws Exception {
+        Connection earlierCon = DriverManager.getConnection(getUrl());
         Connection conn = DriverManager.getConnection(getUrl());
         String ddl = "CREATE TABLE t (k INTEGER NOT NULL PRIMARY KEY, v1 DATE)";
         conn.createStatement().execute(ddl);
@@ -58,6 +59,13 @@ public class ViewTest extends BaseViewTest {
             assertEquals(count + 5, rs.getInt(1));
         }
         assertEquals(4, count);
+        count = 0;
+        rs = earlierCon.createStatement().executeQuery("SELECT k FROM v");
+        while (rs.next()) {
+            count++;
+            assertEquals(count + 5, rs.getInt(1));
+        }
+        assertEquals(4, count);
     }
 
 


Mime
View raw message