You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sd...@apache.org on 2015/08/14 09:28:59 UTC

[25/50] [abbrv] incubator-sentry git commit: SENTRY-799: Fix sentry unit test error: testNonDefault - drop table/dbs before creating (Anne Yu via Lenni Kuff)

SENTRY-799: Fix sentry unit test error: testNonDefault - drop table/dbs before creating (Anne Yu via Lenni Kuff)


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

Branch: refs/heads/hive_plugin_v2
Commit: b7469a12cc1748904d55e423201db7dc9b7b5f8b
Parents: 09d1a92
Author: Lenni Kuff <ls...@cloudera.com>
Authored: Thu Jul 23 13:02:32 2015 -0700
Committer: Lenni Kuff <ls...@cloudera.com>
Committed: Thu Jul 23 13:02:32 2015 -0700

----------------------------------------------------------------------
 .../org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/b7469a12/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java
index acb789f..d1f2774 100644
--- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java
+++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java
@@ -63,6 +63,7 @@ public class TestDbEndToEnd extends AbstractTestWithStaticConfiguration {
   public void testBasic() throws Exception {
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
+    statement.execute("DROP TABLE IF EXISTS t1");
     statement.execute("CREATE TABLE t1 (c1 string)");
     statement.execute("CREATE ROLE user_role");
     statement.execute("GRANT SELECT ON TABLE t1 TO ROLE user_role");
@@ -96,6 +97,7 @@ public class TestDbEndToEnd extends AbstractTestWithStaticConfiguration {
   public void testNonDefault() throws Exception {
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
+    statement.execute("DROP DATABASE IF EXISTS " + DB1 + " CASCADE");
     statement.execute("CREATE database " + DB1);
     statement.execute("USE " + DB1);
     statement.execute("CREATE TABLE t1 (c1 string)");
@@ -116,6 +118,7 @@ public class TestDbEndToEnd extends AbstractTestWithStaticConfiguration {
   public void testUPrivileges() throws Exception {
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
+    statement.execute("DROP TABLE IF EXISTS t1");
     statement.execute("CREATE TABLE t1 (c1 string)");
     statement.execute("CREATE ROLE user_role");
     statement.execute("CREATE ROLE uri_role");