phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdsi...@apache.org
Subject [49/50] [abbrv] phoenix git commit: fix test failure.
Date Fri, 19 Jan 2018 18:03:57 GMT
fix test failure.


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

Branch: refs/heads/system-catalog
Commit: 41f81423322381fedd240302255f9cbb7d42d41d
Parents: 338c650
Author: Thomas D'Silva <tdsilva@apache.org>
Authored: Tue Jan 2 13:04:19 2018 -0800
Committer: Thomas D'Silva <tdsilva@apache.org>
Committed: Tue Jan 2 13:04:56 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/phoenix/end2end/BasePermissionsIT.java   | 4 ++--
 .../org/apache/phoenix/end2end/TableDDLPermissionsIT.java    | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/41f81423/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
index 9d7ef1b..9354b39 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java
@@ -642,12 +642,12 @@ public class BasePermissionsIT extends BaseTest {
         };
     }
 
-    AccessTestAction dropView(final String viewName) throws SQLException {
+    AccessTestAction dropView(final String viewName, final boolean cascade) throws SQLException
{
         return new AccessTestAction() {
             @Override
             public Object run() throws Exception {
                 try (Connection conn = getConnection(); Statement stmt = conn.createStatement();)
{
-                    assertFalse(stmt.execute("DROP VIEW " + viewName));
+                    assertFalse(stmt.execute("DROP VIEW " + viewName + ( cascade ? " CASCADE"
: "" ) ));
                 }
                 return null;
             }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/41f81423/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableDDLPermissionsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableDDLPermissionsIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableDDLPermissionsIT.java
index 8666bb8..1c0c83f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableDDLPermissionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableDDLPermissionsIT.java
@@ -165,7 +165,7 @@ public class TableDDLPermissionsIT extends BasePermissionsIT {
             verifyDenied(createIndex(indexName2, phoenixTableName), AccessDeniedException.class,
unprivilegedUser);
             verifyDenied(createView(viewName2, phoenixTableName),AccessDeniedException.class,
 unprivilegedUser);
             verifyDenied(createView(viewName3, viewName1), AccessDeniedException.class, unprivilegedUser);
-            verifyDenied(dropView(viewName1), AccessDeniedException.class, unprivilegedUser);
+            verifyDenied(dropView(viewName1, true), AccessDeniedException.class, unprivilegedUser);
             
             verifyDenied(dropIndex(indexName1, phoenixTableName), AccessDeniedException.class,
unprivilegedUser);
             verifyDenied(dropTable(phoenixTableName), AccessDeniedException.class, unprivilegedUser);
@@ -210,8 +210,8 @@ public class TableDDLPermissionsIT extends BasePermissionsIT {
             verifyAllowed(rebuildIndex(indexName1, phoenixTableName), regularUser1);
             verifyAllowed(addColumn(phoenixTableName, "val1"), regularUser1);
             verifyAllowed(addProperties(phoenixTableName, "GUIDE_POSTS_WIDTH", "100"), regularUser1);
-            verifyAllowed(dropView(viewName1), regularUser1);
-            verifyAllowed(dropView(viewName2), regularUser1);
+            verifyAllowed(dropView(viewName1, true), regularUser1);
+            verifyAllowed(dropView(viewName2, false), regularUser1);
             verifyAllowed(dropColumn(phoenixTableName, "val1"), regularUser1);
             verifyAllowed(dropIndex(indexName2, phoenixTableName), regularUser1);
             verifyAllowed(dropIndex(indexName1, phoenixTableName), regularUser1);
@@ -222,7 +222,7 @@ public class TableDDLPermissionsIT extends BasePermissionsIT {
             verifyAllowed(createIndex(indexName1, phoenixTableName), superUser2);
             verifyAllowed(createView(viewName1, phoenixTableName), superUser2);
             verifyAllowed(readTable(phoenixTableName), superUser2);
-            verifyAllowed(dropView(viewName1), superUser2);
+            verifyAllowed(dropView(viewName1, false), superUser2);
             verifyAllowed(dropTable(phoenixTableName), superUser2);
 
         } finally {


Mime
View raw message