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-3255 Ensure accumulo is up before running test
Date Thu, 15 Jan 2015 22:53:02 GMT
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/master
Commit: 8a0518a51050641150bc41dd5f18b677d7929f6e
Parents: e49a97a
Author: Josh Elser <elserj@apache.org>
Authored: Thu Jan 15 16:26:00 2015 -0500
Committer: Josh Elser <elserj@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();


Mime
View raw message