accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3599 Work around Ssl*IT still only using MAC
Date Sat, 07 Mar 2015 19:36:34 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master c939dac61 -> 9cd896277


ACCUMULO-3599 Work around Ssl*IT still only using MAC

These tests were throwing an NPE. Use the getCluster()
method to get an extra initialization check.


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

Branch: refs/heads/master
Commit: 9cd8962772c983fb6df579e2728107fc9f1d256a
Parents: c939dac
Author: Josh Elser <elserj@apache.org>
Authored: Sat Mar 7 11:15:35 2015 -0800
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Mar 7 11:28:48 2015 -0800

----------------------------------------------------------------------
 .../org/apache/accumulo/test/functional/BulkIT.java    | 13 ++++++-------
 .../org/apache/accumulo/test/functional/SslIT.java     |  5 ++++-
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9cd89627/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
index 6fae29f..a2a05f6 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
@@ -67,17 +67,16 @@ public class BulkIT extends AccumuloClusterIT {
 
   @Test
   public void test() throws Exception {
-    runTest(getConnector(), getUniqueNames(1)[0], this.getClass().getName(), testName.getMethodName());
+    runTest(getConnector(), getCluster().getFileSystem(), getCluster().getTemporaryPath(),
getAdminPrincipal(), getUniqueNames(1)[0], this.getClass().getName(),
+        testName.getMethodName());
   }
 
-  static void runTest(Connector c, String tableName, String filePrefix, String dirSuffix)
throws AccumuloException, AccumuloSecurityException,
-      TableExistsException, IOException, TableNotFoundException, MutationsRejectedException
{
+  static void runTest(Connector c, FileSystem fs, Path basePath, String principal, String
tableName, String filePrefix, String dirSuffix)
+      throws AccumuloException, AccumuloSecurityException, TableExistsException, IOException,
TableNotFoundException, MutationsRejectedException {
     c.tableOperations().create(tableName);
-    FileSystem fs = cluster.getFileSystem();
     CachedConfiguration.setInstance(fs.getConf());
 
-    Path tempPath = cluster.getTemporaryPath();
-    Path base = new Path(tempPath, "testBulkFail_" + dirSuffix);
+    Path base = new Path(basePath, "testBulkFail_" + dirSuffix);
     fs.delete(base, true);
     fs.mkdirs(base);
     Path bulkFailures = new Path(base, "failures");
@@ -109,7 +108,7 @@ public class BulkIT extends AccumuloClusterIT {
     VerifyIngest.Opts vopts = new VerifyIngest.Opts();
     vopts.setTableName(tableName);
     vopts.random = 56;
-    vopts.setPrincipal(getAdminPrincipal());
+    vopts.setPrincipal(principal);
     for (int i = 0; i < COUNT; i++) {
       vopts.startRow = i * N;
       vopts.rows = N;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9cd89627/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
index eb96cd9..daa6bb3 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
@@ -20,6 +20,8 @@ import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.junit.Test;
 
 /**
@@ -58,7 +60,8 @@ public class SslIT extends ConfigurableMacIT {
 
   @Test
   public void bulk() throws Exception {
-    BulkIT.runTest(getConnector(), getUniqueNames(1)[0], this.getClass().getName(), testName.getMethodName());
+    BulkIT.runTest(getConnector(), FileSystem.getLocal(new Configuration(false)), new Path(getCluster().getConfig().getDir().getAbsolutePath(),
"tmp"), "root",
+        getUniqueNames(1)[0], this.getClass().getName(), testName.getMethodName());
   }
 
   @Test


Mime
View raw message