From c8310f80c59024051530cbac19323c423f6c7785 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 25 Feb 2010 17:18:57 +0000 Subject: QPID-2417: add ability to run DurableSubscriberTest on the java-derby profile once QPID-2422 is fixed git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@916358 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java | 4 ++-- .../src/main/java/org/apache/qpid/test/utils/QpidTestCase.java | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'java/systests/src') diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java index 19b73fcc7c..cf815fbc05 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/unit/ct/DurableSubscriberTest.java @@ -38,7 +38,7 @@ public class DurableSubscriberTest extends QpidTestCase */ public void testDurSubRestoredAfterNonPersistentMessageSent() throws Exception { - if (!isBroker08()) + if (isBrokerStorePersistent() || !isBroker08()) { TopicConnectionFactory factory = getConnectionFactory(); Topic topic = (Topic) getInitialContext().lookup(_topicName); @@ -102,7 +102,7 @@ public class DurableSubscriberTest extends QpidTestCase */ public void testDurSubRestoresMessageSelector() throws Exception { - if (!isBroker08()) + if (isBrokerStorePersistent() || !isBroker08()) { TopicConnectionFactory factory = getConnectionFactory(); Topic topic = (Topic) getInitialContext().lookup(_topicName); diff --git a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java index 84ff7055c5..d693c7f6c1 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java +++ b/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java @@ -166,6 +166,7 @@ public class QpidTestCase extends TestCase private static final String TEST_OUTPUT = "test.output"; private static final String BROKER_LOG_INTERLEAVE = "broker.log.interleave"; private static final String BROKER_LOG_PREFIX = "broker.log.prefix"; + private static final String BROKER_PERSITENT = "broker.persistent"; // values protected static final String JAVA = "java"; @@ -187,6 +188,7 @@ public class QpidTestCase extends TestCase private Boolean _brokerCleanBetweenTests = Boolean.getBoolean(BROKER_CLEAN_BETWEEN_TESTS); private String _brokerVersion = System.getProperty(BROKER_VERSION, VERSION_08); private String _output = System.getProperty(TEST_OUTPUT); + protected Boolean _brokerPersistent = Boolean.getBoolean(BROKER_PERSITENT); private static String _brokerLogPrefix = System.getProperty(BROKER_LOG_PREFIX,"BROKER: "); protected static boolean _interleaveBrokerLog = Boolean.getBoolean(BROKER_LOG_INTERLEAVE); @@ -929,6 +931,11 @@ public class QpidTestCase extends TestCase { return !_broker.equals("vm"); } + + protected boolean isBrokerStorePersistent() + { + return _brokerPersistent; + } public void restartBroker() throws Exception { -- cgit v1.2.1