Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0E568200C6E for ; Mon, 24 Apr 2017 04:14:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CDDE160BB1; Mon, 24 Apr 2017 02:14:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 54EB4160BA6 for ; Mon, 24 Apr 2017 04:14:51 +0200 (CEST) Received: (qmail 80418 invoked by uid 500); 24 Apr 2017 02:14:50 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 80409 invoked by uid 99); 24 Apr 2017 02:14:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2017 02:14:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 25B59E152F; Mon, 24 Apr 2017 02:14:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: activemq-artemis git commit: NO-JIRA: Trivial test fix Date: Mon, 24 Apr 2017 02:14:50 +0000 (UTC) archived-at: Mon, 24 Apr 2017 02:14:52 -0000 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 Authored: Sun Apr 23 22:12:23 2017 -0400 Committer: Clebert Suconic 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());