accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1450882 - in /accumulo/branches/1.5: core/src/main/java/org/apache/accumulo/core/cli/ core/src/test/java/org/apache/accumulo/core/cli/ examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/ test/system/auto/
Date Wed, 27 Feb 2013 17:51:12 GMT
Author: vines
Date: Wed Feb 27 17:51:12 2013
New Revision: 1450882

URL: http://svn.apache.org/r1450882
Log:
ACCUMULO-1120 - credentials now getting properly read


Modified:
    accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
    accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
    accumulo/branches/1.5/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
    accumulo/branches/1.5/test/system/auto/TestUtils.py

Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java?rev=1450882&r1=1450881&r2=1450882&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
(original)
+++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
Wed Feb 27 17:51:12 2013
@@ -104,7 +104,7 @@ public class ClientOpts extends Help {
   public String principal = System.getProperty("user.name");
   
   @Parameter(names = "-p", converter = PasswordConverter.class, description = "Connection
password")
-  public Password password = new Password("secret");
+  public Password password = null;
   
   @Parameter(names = "--password", converter = PasswordConverter.class, description = "Enter
the connection password", password = true)
   public Password securePassword = null;
@@ -112,7 +112,7 @@ public class ClientOpts extends Help {
   public SecurityToken getToken() {
     PasswordToken pt = new PasswordToken();
     if (securePassword == null) {
-      if (password.value == null)
+      if (password == null)
         return null;
       return pt.setPassword(password.value);
     }

Modified: accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java?rev=1450882&r1=1450881&r2=1450882&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
(original)
+++ accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
Wed Feb 27 17:51:12 2013
@@ -43,7 +43,7 @@ public class TestClientOpts {
     BatchScannerOpts bsOpts = new BatchScannerOpts();
     assertEquals(System.getProperty("user.name"), args.principal);
     assertNull(args.securePassword);
-    assertEquals(new PasswordToken().setPassword("secret".getBytes()), args.getToken());
+    assertNull(args.getToken());
     assertEquals(new Long(cfg.getMaxLatency(TimeUnit.MILLISECONDS)), bwOpts.batchLatency);
     assertEquals(new Long(cfg.getTimeout(TimeUnit.MILLISECONDS)), bwOpts.batchTimeout);
     assertEquals(new Long(cfg.getMaxMemory()), bwOpts.batchMemory);

Modified: accumulo/branches/1.5/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java?rev=1450882&r1=1450881&r2=1450882&view=diff
==============================================================================
--- accumulo/branches/1.5/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
(original)
+++ accumulo/branches/1.5/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
Wed Feb 27 17:51:12 2013
@@ -22,6 +22,7 @@ import java.util.Map.Entry;
 import junit.framework.TestCase;
 
 import org.apache.accumulo.core.cli.BatchWriterOpts;
+import org.apache.accumulo.core.cli.ClientOpts.Password;
 import org.apache.accumulo.core.cli.ScannerOpts;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -69,6 +70,7 @@ public class CountTest extends TestCase 
     BatchWriterOpts bwOpts = new BatchWriterOpts();
     opts.instance = "counttest";
     opts.tableName = "dirlisttable";
+    opts.password = new Password("secret");
     opts.mock = true;
     FileCount fc = new FileCount(opts, scanOpts, bwOpts);
     fc.run();

Modified: accumulo/branches/1.5/test/system/auto/TestUtils.py
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/system/auto/TestUtils.py?rev=1450882&r1=1450881&r2=1450882&view=diff
==============================================================================
--- accumulo/branches/1.5/test/system/auto/TestUtils.py (original)
+++ accumulo/branches/1.5/test/system/auto/TestUtils.py Wed Feb 27 17:51:12 2013
@@ -220,7 +220,7 @@ class TestUtilsMixin:
         args = ''
         if timestamp:
             args += "-ts %ld " % int(timestamp)
-        args += '--debug -i %s -u %s --size %d --random 56 --rows %d --start %d --cols 1
--createTable ' % (INSTANCE_NAME, ROOT, size, count, start)
+        args += '--debug -i %s -u %s --size %d --random 56 --rows %d --start %d --cols 1
--createTable -p secret' % (INSTANCE_NAME, ROOT, size, count, start)
         if colf:
            args = '--columnFamily %s ' % colf + args
         return self.runClassOn(host, klass, args.split(), **kwargs)
@@ -230,7 +230,7 @@ class TestUtilsMixin:
         args = ''
         if timestamp:
             args += "-ts %ld " % int(timestamp)
-        args += '-i %s -u %s --size %d --random 56 -cf %s --rows %d --start %d --cols 1 '
% (INSTANCE_NAME, ROOT, size, colf, count, start)
+        args += '-i %s -u %s --size %d --random 56 -cf %s --rows %d --start %d --cols 1 -p
secret' % (INSTANCE_NAME, ROOT, size, colf, count, start)
         return self.runClassOn(host, klass, args.split())
 
     def stop_accumulo(self, signal=signal.SIGHUP):



Mime
View raw message