Repository: accumulo Updated Branches: refs/heads/1.6 e49a97ad7 -> 8a0518a51 refs/heads/master aae9e977f -> fb7540629
ACCUMULO-3255 Ensure accumulo is up before running test Without ensuring that accumulo is actually running, the expected exception that a second instance cannot be started on top of the first won't fire. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8a0518a5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8a0518a5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8a0518a5 Branch: refs/heads/1.6 Commit: 8a0518a51050641150bc41dd5f18b677d7929f6e Parents: e49a97a Author: Josh Elser <els...@apache.org> Authored: Thu Jan 15 16:26:00 2015 -0500 Committer: Josh Elser <els...@apache.org> Committed: Thu Jan 15 17:38:24 2015 -0500 ---------------------------------------------------------------------- .../test/java/org/apache/accumulo/test/ExistingMacIT.java | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8a0518a5/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java b/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java index 226d61d..df44feb 100644 --- a/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java +++ b/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java @@ -133,6 +133,16 @@ public class ExistingMacIT extends ConfigurableMacIT { @Test public void testExistingRunningInstance() throws Exception { + final String table = getUniqueNames(1)[0]; + Connector conn = getConnector(); + // Ensure that a master and tserver are up so the existing instance check won't fail. + conn.tableOperations().create(table); + BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig()); + Mutation m = new Mutation("foo"); + m.put("cf", "cq", "value"); + bw.addMutation(m); + bw.close(); + File hadoopConfDir = createTestDir(ExistingMacIT.class.getSimpleName() + "_hadoop_conf_2"); FileUtils.deleteQuietly(hadoopConfDir); hadoopConfDir.mkdirs();