You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/09/18 20:34:42 UTC

[2/3] git commit: ACCUMULO-3144 Give the servers some time to flush out their buffers to the MAC log pipe.

ACCUMULO-3144 Give the servers some time to flush out their buffers to the MAC log pipe.


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

Branch: refs/heads/master
Commit: 32570d5a554503d7af6c76379edd8d46175637e2
Parents: 255ce5f
Author: Josh Elser <el...@apache.org>
Authored: Thu Sep 18 14:33:21 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Sep 18 14:33:21 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/test/AuditMessageIT.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/32570d5a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
index 1730b14..3ed1f02 100644
--- a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java
@@ -70,7 +70,8 @@ public class AuditMessageIT extends ConfigurableMacIT {
   private static final String NEW_TEST_TABLE_NAME = "oranges";
   private static final String THIRD_TEST_TABLE_NAME = "pears";
   private static final Authorizations auths = new Authorizations("private", "public");
-  
+
+  @Override
   public void beforeClusterStart(MiniAccumuloConfigImpl cfg) throws Exception {
     new File(cfg.getConfDir(), "auditLog.xml").delete();
   }
@@ -91,12 +92,19 @@ public class AuditMessageIT extends ConfigurableMacIT {
 
   /**
    * Returns a List of Audit messages that have been grep'd out of the MiniAccumuloCluster output.
-   * 
+   *
    * @param stepName
    *          A unique name for the test being executed, to identify the System.out messages.
    * @return A List of the Audit messages, sorted (so in chronological order).
    */
   private ArrayList<String> getAuditMessages(String stepName) throws IOException {
+    // ACCUMULO-3144 Make sure we give the processes enough time to flush the write buffer
+    try {
+      Thread.sleep(2000);
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
+      throw new IOException("Interrupted waiting for data to be flushed to output streams");
+    }
 
     for (MiniAccumuloClusterImpl.LogWriter lw : getCluster().getLogWriters()) {
       lw.flush();