This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new a7aafc0 NO-JIRA small tweak on ActiveMQTestBase
a7aafc0 is described below
commit a7aafc0ab4c027e0739b6320422f4e2cc041b264
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue Jul 7 15:26:35 2020 -0400
NO-JIRA small tweak on ActiveMQTestBase
---
.../activemq/artemis/tests/util/ActiveMQTestBase.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
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 8209f0a..981e38e 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
@@ -149,6 +149,7 @@ import org.apache.activemq.artemis.utils.Wait;
import org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory;
import org.jboss.logging.Logger;
import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.ClassRule;
@@ -2031,6 +2032,13 @@ public abstract class ActiveMQTestBase extends Assert {
}
}
+ @AfterClass
+ public static void checkLibaio() throws Throwable {
+ if (!Wait.waitFor(() -> LibaioContext.getTotalMaxIO() == 0)) {
+ Assert.fail("test did not close all its files " +
LibaioContext.getTotalMaxIO());
+ }
+ }
+
private void checkFilesUsage() throws Exception {
int invmSize = InVMRegistry.instance.size();
if (invmSize > 0) {
@@ -2038,11 +2046,6 @@ public abstract class ActiveMQTestBase extends Assert {
baseLog.info(threadDump("Thread dump"));
fail("invm registry still had acceptors registered");
}
-
- if (!Wait.waitFor(() -> LibaioContext.getTotalMaxIO() == 0)) {
- Assert.fail("test did not close all its files " +
LibaioContext.getTotalMaxIO());
- }
-
}
private void cleanupPools() {