activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: NO-JIRA: Trivial test fix
Date Mon, 24 Apr 2017 02:14:50 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 7074baea2 -> 7facd28a1


NO-JIRA: Trivial test fix


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

Branch: refs/heads/master
Commit: 7facd28a18e225063a7bb13d54172b7dc2ec9feb
Parents: 7074bae
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Sun Apr 23 22:12:23 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Sun Apr 23 22:12:23 2017 -0400

----------------------------------------------------------------------
 .../tests/unit/core/journal/impl/JournalImplTestUnit.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7facd28a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java
index 39507aa..50ad154 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java
@@ -978,7 +978,13 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase
{
          add(i);
       }
 
-      Assert.assertEquals(calculateNumberOfFiles(journal, fileSize, journal.getAlignment(),
200, recordLength, 200, JournalImpl.SIZE_DELETE_RECORD_TX, 1, JournalImpl.SIZE_COMMIT_RECORD,
10, JournalImpl.SIZE_ADD_RECORD + recordLength), journal.getDataFilesCount());
+      int files = calculateNumberOfFiles(journal, fileSize, journal.getAlignment(), 200,
recordLength, 200, JournalImpl.SIZE_DELETE_RECORD_TX, 1, JournalImpl.SIZE_COMMIT_RECORD, 10,
JournalImpl.SIZE_ADD_RECORD + recordLength);
+
+      for (int i = 0; i < 100 && journal.getDataFilesCount() != files; i++) {
+         Thread.sleep(10);
+      }
+
+      Assert.assertEquals(files, journal.getDataFilesCount());
       Assert.assertEquals(0, journal.getFreeFilesCount());
       Assert.assertEquals(10, journal.getIDMapSize());
 


Mime
View raw message