From 81f89ae9f5553206202721ef3adb40bdad1ab347 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 21 Feb 2018 12:10:40 -0600 Subject: [PATCH 1/2] NO-JIRA comments to clarify Travis 'script' command --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index cc4fed27fd..53074f1253 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ sudo: false language: java install: true + +# use 'install' so smoke-tests will work +# use '-Pextra-tests' to ensure extra-tests compiles even though they won't actually run script: mvn -Pfast-tests -Pextra-tests -B install + cache: directories: - $HOME/.m2 From 5133e68ea78d5e2af10df46edd281b293a8a06af Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 21 Feb 2018 14:22:34 -0600 Subject: [PATCH 2/2] NO-JIRA fix AlignedJournalImplTest intermittent failure --- .../unit/core/journal/impl/AlignedJournalImplTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java index b85be80cd7..517fcf0052 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java @@ -33,6 +33,7 @@ import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo; import org.apache.activemq.artemis.core.journal.RecordInfo; import org.apache.activemq.artemis.core.journal.TransactionFailureCallback; import org.apache.activemq.artemis.core.journal.impl.JournalImpl; +import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.unit.UnitTestLogger; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding; @@ -998,10 +999,11 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { @Test public void testReclaimAfterRollabck() throws Exception { final int JOURNAL_SIZE = 2000; + final int COUNT = 10; setupAndLoadJournal(JOURNAL_SIZE, 1); - for (int i = 0; i < 10; i++) { + for (int i = 0; i < COUNT; i++) { journalImpl.appendAddRecordTransactional(1L, i, (byte) 0, new SimpleEncoding(1, (byte) 0)); journalImpl.forceMoveNextFile(); } @@ -1010,6 +1012,9 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { journalImpl.forceMoveNextFile(); + // wait for the previous call to forceMoveNextFile() to complete + assertTrue(Wait.waitFor(() -> factory.listFiles("tt").size() == COUNT + 3, 2000, 50)); + journalImpl.checkReclaimStatus(); Assert.assertEquals(0, journalImpl.getDataFilesCount());