From 2efb6df6197e87743f8ef2c8e22fbbb1851b162c Mon Sep 17 00:00:00 2001 From: gtully Date: Wed, 19 Mar 2014 15:32:10 +0000 Subject: [PATCH] speed up this test and improve logging in the event of failure --- .../usecases/DurableSubSelectorDelayWithRestartTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubSelectorDelayWithRestartTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubSelectorDelayWithRestartTest.java index 1bfd52e644..5e1cb429ba 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubSelectorDelayWithRestartTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubSelectorDelayWithRestartTest.java @@ -83,10 +83,11 @@ public class DurableSubSelectorDelayWithRestartTest { } final KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter(); - assertTrue("only one journal file should be left ", Wait.waitFor(new Wait.Condition() { + assertTrue("small number of journal files should be left ", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { + LOG.info("journal data file count - expected {} actual {}", 4, pa.getStore().getJournal().getFileMap().size()); return pa.getStore().getJournal().getFileMap().size() < 4; } }, TimeUnit.MINUTES.toMillis(3))); @@ -299,6 +300,7 @@ public class DurableSubSelectorDelayWithRestartTest { KahaDBPersistenceAdapter kahadb = new KahaDBPersistenceAdapter(); kahadb.setDirectory(kahadbData); kahadb.setJournalMaxFileLength( 10 * 1024); + kahadb.setCleanupInterval(5000); broker.setPersistenceAdapter(kahadb); broker.addConnector("tcp://localhost:61656");