Updated Branches:
  refs/heads/db_policy_store 2a03648bc -> 80aec7008

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/80aec700/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyService.java
----------------------------------------------------------------------
diff --git 
a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyService.java
 
b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyService.java
deleted file mode 100644
index 9b32b2b..0000000
--- 
a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyService.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.sentry.provider.db.service.thrift;
-
-import java.util.HashSet;
-
-import org.apache.sentry.service.api.TCreateSentryRoleRequest;
-import org.apache.sentry.service.api.TCreateSentryRoleResponse;
-import org.apache.sentry.service.api.TSentryPrivilege;
-import org.apache.sentry.service.api.TSentryRole;
-import org.apache.sentry.service.api.TSentryStatus;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TestSentryPolicyService {
-
-  private SentryService server;
-  private SentryServiceClient client;
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(TestSentryPolicyService.class);
-
-  @Before
-  public void setup() throws Exception {
-    server = new SentryService();
-    server.startSentryService();
-    // Wait for startup to complete
-    Thread.sleep(2000);
-    client = SentryServiceClient.createClient();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    SentryServiceClient.destroyClient(client);
-    server.stopSentryService();
-  }
-
-  @Test
-  public void testClientServerConnection() throws Exception {
-    TCreateSentryRoleRequest req = new TCreateSentryRoleRequest();
-    TSentryRole role = new TSentryRole();
-    role.setRoleName("admin role");
-    role.setCreateTime(System.currentTimeMillis());
-    role.setGrantorPrincipal("test");
-    role.setPrivileges(new HashSet<TSentryPrivilege>());
-    req.setUserName("admin");
-    req.setRole(role);
-    TCreateSentryRoleResponse resp = client.createRole(req);
-    if (resp.getStatus().getValue() != TSentryStatus.OK) {
-      Assert.fail("Received invalid status");
-    } else {
-      LOGGER.info("Successfully opened connection");
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/80aec700/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
----------------------------------------------------------------------
diff --git 
a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
 
b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
new file mode 100644
index 0000000..74704e2
--- /dev/null
+++ 
b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sentry.provider.db.service.thrift;
+import java.util.HashSet;
+
+import org.apache.sentry.service.api.TCreateSentryRoleRequest;
+import org.apache.sentry.service.api.TCreateSentryRoleResponse;
+import org.apache.sentry.service.api.TSentryPrivilege;
+import org.apache.sentry.service.api.TSentryRole;
+import org.apache.sentry.service.api.TSentryStatus;
+import org.junit.Assert;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestSentryServiceIntegration extends SentryServiceIntegrationBase 
{
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(TestSentryServiceIntegration.class);
+
+  @Test
+  public void testClientServerConnection() throws Exception {
+    TCreateSentryRoleRequest req = new TCreateSentryRoleRequest();
+    TSentryRole role = new TSentryRole();
+    role.setRoleName("admin_r");
+    role.setCreateTime(System.currentTimeMillis());
+    role.setGrantorPrincipal("test");
+    role.setPrivileges(new HashSet<TSentryPrivilege>());
+    req.setUserName("admin");
+    req.setRole(role);
+    TCreateSentryRoleResponse resp = client.createRole(req);
+    if (resp.getStatus().getValue() == TSentryStatus.OK) {
+      LOGGER.info("Successfully opened connection");
+    } else {
+      Assert.fail("Received invalid status: " + resp.getStatus().getMessage()
+          + ":\nstack:" + resp.getStatus().getStack());
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/80aec700/sentry-provider/sentry-provider-db/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git 
a/sentry-provider/sentry-provider-db/src/test/resources/log4j.properties 
b/sentry-provider/sentry-provider-db/src/test/resources/log4j.properties
index e79a6ac..9766758 100644
--- a/sentry-provider/sentry-provider-db/src/test/resources/log4j.properties
+++ b/sentry-provider/sentry-provider-db/src/test/resources/log4j.properties
@@ -21,7 +21,7 @@
 #
 # For testing, it may also be convenient to specify
 
-log4j.rootLogger=INFO,console
+log4j.rootLogger=DEBUG,console
 
 log4j.appender.console=org.apache.log4j.ConsoleAppender
 log4j.appender.console.target=System.err
@@ -29,3 +29,6 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
 log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n
 
 log4j.logger.org.apache.hadoop.conf.Configuration=INFO
+log4j.logger.org.apache.hadoop.metrics2=INFO
+log4j.logger.org.apache.directory=INFO
+log4j.logger.org.apache.directory.api.ldap.model.entry.AbstractValue=WARN

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/80aec700/sentry-tests/sentry-tests-hive/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/pom.xml 
b/sentry-tests/sentry-tests-hive/pom.xml
index 08df4c2..7ae2de1 100644
--- a/sentry-tests/sentry-tests-hive/pom.xml
+++ b/sentry-tests/sentry-tests-hive/pom.xml
@@ -71,16 +71,6 @@ limitations under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>
-      <artifactId>hive-pdk</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-hwi</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
       <artifactId>hive-jdbc</artifactId>
       <scope>test</scope>
     </dependency>
@@ -110,16 +100,6 @@ limitations under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-builtins</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-anttasks</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
       <scope>test</scope>
@@ -286,8 +266,8 @@ limitations under the License.
                     }
                     rm -rf $DOWNLOAD_DIR
                     mkdir -p $DOWNLOAD_DIR
-                    download 
"http://archive.cloudera.com/cdh4/cdh/4/hadoop-latest.tar.gz"; hadoop.tar.gz 
hadoop
-                    download 
"http://archive.cloudera.com/cdh4/cdh/4/hive-latest.tar.gz"; hive.tar.gz hive
+                    download 
"http://repos.jenkins.cloudera.com/cdh5-nightly/cdh/5/hadoop-latest.tar.gz"; 
hadoop.tar.gz hadoop
+                    download 
"http://repos.jenkins.cloudera.com/cdh5-nightly/cdh/5/hive-latest.tar.gz"; 
hive.tar.gz hive
                   </echo>
                   <exec executable="sh" dir="${basedir}" failonerror="true">
                     <arg line="target/download.sh"/>

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/80aec700/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
----------------------------------------------------------------------
diff --git 
a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
 
b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
index fa8a75e..6bb39bc 100644
--- 
a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
+++ 
b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
@@ -190,7 +190,7 @@ public class TestServerConfiguration extends 
AbstractTestWithHiveServer {
     verifyConfig(testUser, ConfVars.HIVE_EXEC_FILTER_HOOK.varname,
         HiveAuthzBindingSessionHook.FILTER_HOOK);
     verifyConfig(testUser, ConfVars.HIVE_EXTENDED_ENITITY_CAPTURE.varname, 
"true");
-    verifyConfig(testUser, ConfVars.HIVE_SERVER2_AUTHZ_EXTERNAL_EXEC.varname, 
"false");
+    verifyConfig(testUser, ConfVars.HIVE_SECURITY_COMMAND_WHITELIST.varname, 
"set");
     verifyConfig(testUser, ConfVars.SCRATCHDIRPERMISSION.varname, 
HiveAuthzBindingSessionHook.SCRATCH_DIR_PERMISSIONS);
     verifyConfig(testUser, HiveConf.ConfVars.HIVE_CONF_RESTRICTED_LIST.varname,
         HiveAuthzBindingSessionHook.ACCESS_RESTRICT_LIST);
@@ -263,4 +263,4 @@ public class TestServerConfiguration extends 
AbstractTestWithHiveServer {
     context.close();
   }
 
-}
\ No newline at end of file
+}

Reply via email to