You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/06/29 20:54:57 UTC

[2/5] activemq-artemis git commit: NO-JIRA Adding check back in place

NO-JIRA Adding check back in place

This was to avoid one failing test making other tests to fail in cascade around libaio.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a2f936c3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a2f936c3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a2f936c3

Branch: refs/heads/master
Commit: a2f936c3405988ea91204a4b153dc7b89731f2b3
Parents: 2585ecd
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Jun 28 15:55:34 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jun 29 16:13:55 2016 -0400

----------------------------------------------------------------------
 .../artemis/tests/util/ActiveMQTestBase.java    | 45 +++++++++-----------
 1 file changed, 20 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a2f936c3/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index eee1719..6a9f729 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -2030,31 +2030,26 @@ public abstract class ActiveMQTestBase extends Assert {
 
       long timeout = System.currentTimeMillis() + 15000;
 
-      //      while (AsynchronousFileImpl.getTotalMaxIO() != 0 && System.currentTimeMillis() > timeout)
-      //      {
-      //         try
-      //         {
-      //            Thread.sleep(100);
-      //         }
-      //         catch (Exception ignored)
-      //         {
-      //         }
-      //      }
-      //
-      //      int invmSize = InVMRegistry.instance.size();
-      //      if (invmSize > 0)
-      //      {
-      //         InVMRegistry.instance.clear();
-      //         log.info(threadDump("Thread dump"));
-      //         fail("invm registry still had acceptors registered");
-      //      }
-      //
-      //      final int totalMaxIO = AsynchronousFileImpl.getTotalMaxIO();
-      //      if (totalMaxIO != 0)
-      //      {
-      //         AsynchronousFileImpl.resetMaxAIO();
-      //         Assert.fail("test did not close all its files " + totalMaxIO);
-      //      }
+      while (LibaioContext.getTotalMaxIO() != 0 && System.currentTimeMillis() > timeout) {
+         try {
+            Thread.sleep(100);
+         }
+         catch (Exception ignored) {
+         }
+      }
+
+      int invmSize = InVMRegistry.instance.size();
+      if (invmSize > 0) {
+         InVMRegistry.instance.clear();
+         log.info(threadDump("Thread dump"));
+         fail("invm registry still had acceptors registered");
+      }
+
+      final long totalMaxIO = LibaioContext.getTotalMaxIO();
+      if (totalMaxIO != 0) {
+         LibaioContext.resetMaxAIO();
+         Assert.fail("test did not close all its files " + totalMaxIO);
+      }
    }
 
    private void cleanupPools() {