Repository: sentry
Updated Branches:
  refs/heads/master a5ed6d912 -> ed965d871


Some trivial typos + changes to the Kafka tests


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

Branch: refs/heads/master
Commit: ed965d8712ae087bff3fddd6d74b4d475a541349
Parents: a5ed6d9
Author: Colm O hEigeartaigh <[email protected]>
Authored: Mon Sep 12 11:14:05 2016 +0100
Committer: Colm O hEigeartaigh <[email protected]>
Committed: Mon Sep 12 11:14:05 2016 +0100

----------------------------------------------------------------------
 .../sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java  | 7 ++++---
 .../java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java | 5 +----
 .../org/apache/sentry/tests/e2e/kafka/TestAuthorize.java     | 8 ++++----
 3 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/ed965d87/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java
----------------------------------------------------------------------
diff --git 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java
 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java
index 02d51c0..5807f68 100644
--- 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java
+++ 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java
@@ -61,8 +61,6 @@ public class AbstractKafkaSentryTestBase {
   protected static final String ADMIN_USER = "kafka";
   protected static final String ADMIN_GROUP = "group_kafka";
   protected static final String ADMIN_ROLE  = "role_kafka";
-  private static final long CACHE_TTL_MS = 1;
-  private static final int SAFETY_FACTOR = 2; // Sleep for specified times of 
expected time for an operation to complete.
 
   protected static SentryService sentryServer;
   protected static File sentrySitePath;
@@ -75,6 +73,9 @@ public class AbstractKafkaSentryTestBase {
 
   protected static String bootstrapServers = null;
   protected static KafkaTestServer kafkaServer = null;
+  
+  private static final long CACHE_TTL_MS = 1;
+  private static final int SAFETY_FACTOR = 2; // Sleep for specified times of 
expected time for an operation to complete.
 
   @BeforeClass
   public static void beforeTestEndToEnd() throws Exception {
@@ -114,7 +115,7 @@ public class AbstractKafkaSentryTestBase {
     policyFilePath = new File(baseDir, "local_policy_file.ini");
     policyFile = new PolicyFile();
 
-    /** set the configuratoion for Sentry Service */
+    /** set the configuration for Sentry Service */
     Configuration conf = new Configuration();
 
     conf.set(ServerConfig.SECURITY_MODE, ServerConfig.SECURITY_MODE_NONE);

http://git-wip-us.apache.org/repos/asf/sentry/blob/ed965d87/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java
----------------------------------------------------------------------
diff --git 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java
 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java
index a02ace7..a52c8d6 100644
--- 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java
+++ 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAclsCrud.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sentry.tests.e2e.kafka;
 
-import junit.framework.Assert;
 import kafka.security.auth.Acl;
 import kafka.security.auth.Allow$;
 import kafka.security.auth.Operation$;
@@ -26,9 +25,8 @@ import org.apache.kafka.common.security.auth.KafkaPrincipal;
 import org.apache.sentry.kafka.authorizer.SentryKafkaAuthorizer;
 import org.apache.sentry.kafka.conf.KafkaAuthConf;
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import scala.collection.immutable.Map;
 
 import java.util.HashMap;
@@ -36,7 +34,6 @@ import java.util.HashSet;
 import java.util.Set;
 
 public class TestAclsCrud extends AbstractKafkaSentryTestBase {
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(TestAclsCrud.class);
   private SentryKafkaAuthorizer sentryKafkaAuthorizer;
 
   @After

http://git-wip-us.apache.org/repos/asf/sentry/blob/ed965d87/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java
----------------------------------------------------------------------
diff --git 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java
 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java
index 6017451..0b1ef68 100644
--- 
a/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java
+++ 
b/sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java
@@ -17,7 +17,6 @@
 package org.apache.sentry.tests.e2e.kafka;
 
 import com.google.common.collect.Sets;
-import junit.framework.Assert;
 import org.apache.kafka.clients.CommonClientConfigs;
 import org.apache.kafka.clients.consumer.ConsumerConfig;
 import org.apache.kafka.clients.consumer.ConsumerRebalanceListener;
@@ -37,6 +36,7 @@ import org.apache.sentry.core.model.kafka.Topic;
 import 
org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceClient;
 import org.apache.sentry.provider.db.generic.service.thrift.TAuthorizable;
 import org.apache.sentry.provider.db.generic.service.thrift.TSentryPrivilege;
+import org.junit.Assert;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -275,11 +275,11 @@ public class TestAuthorize extends 
AbstractKafkaSentryTestBase {
     Assert.fail(failureMessage);
   }
 
-  class CustomRebalanceListener implements ConsumerRebalanceListener {
+  private static class CustomRebalanceListener implements 
ConsumerRebalanceListener {
 
-    KafkaConsumer consumer = null;
+    private KafkaConsumer<String, String>  consumer = null;
 
-    CustomRebalanceListener(KafkaConsumer kafkaConsumer) {
+    CustomRebalanceListener(KafkaConsumer<String, String>  kafkaConsumer) {
       consumer = kafkaConsumer;
     }
 

Reply via email to