Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B70318C62 for ; Mon, 1 Jun 2015 17:37:45 +0000 (UTC) Received: (qmail 49643 invoked by uid 500); 1 Jun 2015 17:37:45 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 49540 invoked by uid 500); 1 Jun 2015 17:37:45 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 49378 invoked by uid 99); 1 Jun 2015 17:37:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 17:37:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DCFF4E0663; Mon, 1 Jun 2015 17:37:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ecn@apache.org To: commits@accumulo.apache.org Date: Mon, 01 Jun 2015 17:37:47 -0000 Message-Id: <35eeed2911134d66a2b043e52b3823dc@git.apache.org> In-Reply-To: <6374aa3489d348f197f08c7b15cdd4bf@git.apache.org> References: <6374aa3489d348f197f08c7b15cdd4bf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] accumulo git commit: ACCUMULO-3871 fixed NPE and added more output to m/r runner; fixed some tests ACCUMULO-3871 fixed NPE and added more output to m/r runner; fixed some tests Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f6bd3eec Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f6bd3eec Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f6bd3eec Branch: refs/heads/master Commit: f6bd3eecd8e7f5704ae9804e9cf07b205de78a12 Parents: c5e6804 Author: Eric C. Newton Authored: Mon Jun 1 13:37:37 2015 -0400 Committer: Eric C. Newton Committed: Mon Jun 1 13:37:37 2015 -0400 ---------------------------------------------------------------------- test/pom.xml | 7 +++++++ .../accumulo/test/IntegrationTestMapReduce.java | 22 ++++++++++++++++++++ .../MissingWalHeaderCompletesRecoveryIT.java | 4 ++-- .../accumulo/test/functional/CloneTestIT.java | 3 +-- ...bageCollectorCommunicatesWithTServersIT.java | 6 +++--- 5 files changed, 35 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/pom.xml ---------------------------------------------------------------------- diff --git a/test/pom.xml b/test/pom.xml index 516461b..c68e158 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -246,6 +246,13 @@ org.apache.maven.plugins maven-jar-plugin + + + + false + + + make-test-jar http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java b/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java index 6b9e82e..42c1095 100644 --- a/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java +++ b/test/src/test/java/org/apache/accumulo/test/IntegrationTestMapReduce.java @@ -32,8 +32,11 @@ import org.apache.hadoop.mapreduce.lib.input.NLineInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; +import org.junit.runner.Description; import org.junit.runner.JUnitCore; import org.junit.runner.Result; +import org.junit.runner.notification.Failure; +import org.junit.runner.notification.RunListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,8 +55,27 @@ public class IntegrationTestMapReduce extends Configured implements Tool { } catch (ClassNotFoundException e) { log.debug("Error finding class {}", className, e); context.write(new IntWritable(-1), new Text(e.toString())); + return; } JUnitCore core = new JUnitCore(); + core.addListener(new RunListener() { + + @Override + public void testStarted(Description description) throws Exception { + log.info("Starting {}", description); + } + + @Override + public void testFinished(Description description) throws Exception { + log.info("Finished {}", description); + } + + @Override + public void testFailure(Failure failure) throws Exception { + log.info("Test failed: {}", failure.getDescription(), failure.getException()); + } + + }); log.info("Running test {}", className); Result result = core.run(test); if (result.wasSuccessful()) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java b/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java index e315841..81c5d84 100644 --- a/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java +++ b/test/src/test/java/org/apache/accumulo/test/MissingWalHeaderCompletesRecoveryIT.java @@ -105,7 +105,7 @@ public class MissingWalHeaderCompletesRecoveryIT extends ConfigurableMacIT { public void testEmptyWalRecoveryCompletes() throws Exception { Connector conn = getConnector(); MiniAccumuloClusterImpl cluster = getCluster(); - FileSystem fs = FileSystem.get(new Configuration()); + FileSystem fs = cluster.getFileSystem(); // Fake out something that looks like host:port, it's irrelevant String fakeServer = "127.0.0.1:12345"; @@ -157,7 +157,7 @@ public class MissingWalHeaderCompletesRecoveryIT extends ConfigurableMacIT { public void testPartialHeaderWalRecoveryCompletes() throws Exception { Connector conn = getConnector(); MiniAccumuloClusterImpl cluster = getCluster(); - FileSystem fs = FileSystem.get(new Configuration()); + FileSystem fs = getCluster().getFileSystem(); // Fake out something that looks like host:port, it's irrelevant String fakeServer = "127.0.0.1:12345"; http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java index 4fad30b..f7a9165 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java @@ -49,7 +49,6 @@ import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.harness.AccumuloClusterIT; import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl; import org.apache.accumulo.server.ServerConstants; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -209,7 +208,7 @@ public class CloneTestIT extends AccumuloClusterIT { writeData(table3, c).close(); c.tableOperations().flush(table3, null, null, true); // check for files - FileSystem fs = FileSystem.get(new Configuration()); + FileSystem fs = getCluster().getFileSystem(); String id = c.tableOperations().tableIdMap().get(table3); FileStatus[] status = fs.listStatus(new Path(rootPath + "/accumulo/tables/" + id)); assertTrue(status.length > 0); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6bd3eec/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java index 6196cca..38d2276 100644 --- a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java +++ b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java @@ -16,6 +16,7 @@ */ package org.apache.accumulo.test.replication; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -57,7 +58,6 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.io.Text; -import org.bouncycastle.util.Arrays; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; @@ -242,7 +242,7 @@ public class GarbageCollectorCommunicatesWithTServersIT extends ConfigurableMacI // Use the rfile which was just replaced by the MajC to determine when the GC has ran Path fileToBeDeleted = new Path(filesForTable.iterator().next()); - FileSystem fs = fileToBeDeleted.getFileSystem(new Configuration()); + FileSystem fs = getCluster().getFileSystem(); boolean fileExists = fs.exists(fileToBeDeleted); while (fileExists) { @@ -327,7 +327,7 @@ public class GarbageCollectorCommunicatesWithTServersIT extends ConfigurableMacI // Use the rfile which was just replaced by the MajC to determine when the GC has ran Path fileToBeDeleted = new Path(filesForTable.iterator().next()); - FileSystem fs = fileToBeDeleted.getFileSystem(new Configuration()); + FileSystem fs = getCluster().getFileSystem(); boolean fileExists = fs.exists(fileToBeDeleted); while (fileExists) {