sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject [1/2] sentry git commit: SENTRY-1401: In V2, show role grant group groupname should not throw an exception if group doesnt exist in db (Ke Jia via Dapeng Sun)
Date Sat, 11 Mar 2017 02:10:13 GMT
Repository: sentry
Updated Branches:
  refs/heads/sentry-ha-redesign 7868f80c2 -> c8de9a907


SENTRY-1401: In V2, show role grant group groupname should not throw an exception if group
doesnt exist in db (Ke Jia via Dapeng Sun)


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

Branch: refs/heads/sentry-ha-redesign
Commit: f71e2e825b30fcd72fb0b217c3a11105b254880d
Parents: 7868f80
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Fri Mar 10 18:09:10 2017 -0800
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Fri Mar 10 18:09:10 2017 -0800

----------------------------------------------------------------------
 .../tests/e2e/dbprovider/TestDatabaseProvider.java   | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/f71e2e82/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
b/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
index 0012a8a..8cfd0d0 100644
--- a/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
+++ b/sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
@@ -2019,8 +2019,19 @@ public class TestDatabaseProvider extends AbstractTestWithStaticConfiguration
{
     expected.add(testRole1);
     assertTestRoles(resultSet, expected, false);
 
-    context.assertSentryException(statement, "SHOW ROLE GRANT GROUP Admin",
-        SentryNoSuchObjectException.class.getSimpleName());
+    //context.assertSentryException(statement, "SHOW ROLE GRANT GROUP Admin",
+        //SentryNoSuchObjectException.class.getSimpleName());
+    ResultSet res = statement.executeQuery("SHOW ROLE GRANT GROUP Admin");
+
+    List<String> expectedResult = new ArrayList<String>();
+    List<String> returnedResult = new ArrayList<String>();
+
+    while (res.next()) {
+      returnedResult.add(res.getString(1).trim());
+    }
+    validateReturnedResult(expectedResult, returnedResult);
+    returnedResult.clear();
+    expectedResult.clear();
 
     statement.close();
     connection.close();


Mime
View raw message