accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3689 Delete the user if it already exists
Date Fri, 20 Mar 2015 00:39:42 GMT
ACCUMULO-3689 Delete the user if it already exists


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

Branch: refs/heads/master
Commit: bdedcde8440d95ca4a89e228f456406f7afaf13f
Parents: b43d29a
Author: Josh Elser <elserj@apache.org>
Authored: Thu Mar 19 18:57:12 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Mar 19 18:57:12 2015 -0400

----------------------------------------------------------------------
 .../test/java/org/apache/accumulo/test/ScanIteratorIT.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bdedcde8/test/src/test/java/org/apache/accumulo/test/ScanIteratorIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ScanIteratorIT.java b/test/src/test/java/org/apache/accumulo/test/ScanIteratorIT.java
index 4a791c0..438279d 100644
--- a/test/src/test/java/org/apache/accumulo/test/ScanIteratorIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ScanIteratorIT.java
@@ -51,8 +51,11 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ScanIteratorIT extends AccumuloClusterIT {
+  private static final Logger log = LoggerFactory.getLogger(ScanIteratorIT.class);
 
   @Override
   public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{
@@ -86,6 +89,10 @@ public class ScanIteratorIT extends AccumuloClusterIT {
       userToken = new PasswordToken(clusterUser.getPassword());
       saslEnabled = false;
     }
+    if (connector.securityOperations().listLocalUsers().contains(user)) {
+      log.info("Dropping {}", user);
+      connector.securityOperations().dropLocalUser(user);
+    }
     connector.securityOperations().createLocalUser(user, userToken);
     connector.securityOperations().grantTablePermission(user, tableName, TablePermission.READ);
     connector.securityOperations().grantTablePermission(user, tableName, TablePermission.WRITE);


Mime
View raw message