From dc58d0f43925ccba273e62714133060db9eda2be Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Thu, 8 Oct 2009 12:36:55 +0000 Subject: QPID-942 : Updated test to use built in client property setting mechanism git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@823146 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/server/queue/ProducerFlowControlTest.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlTest.java index 02db144694..f220760511 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ProducerFlowControlTest.java @@ -162,9 +162,8 @@ public class ProducerFlowControlTest extends AbstractTestLogging public void testClientLogMessages() throws JMSException, NamingException, AMQException, InterruptedException, IOException { - long origTimeoutValue = Long.getLong("qpid.flow_control_wait_failure",AMQSession.DEFAULT_FLOW_CONTROL_WAIT_FAILURE); - System.setProperty("qpid.flow_control_wait_failure","3000"); - System.setProperty("qpid.flow_control_wait_notify_period","1000"); + setTestClientSystemProperty("qpid.flow_control_wait_failure","3000"); + setTestClientSystemProperty("qpid.flow_control_wait_notify_period","1000"); Session session = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -189,8 +188,6 @@ public class ProducerFlowControlTest extends AbstractTestLogging results = _monitor.findMatches("Message send failed due to timeout waiting on broker enforced flow control"); assertEquals("Incorrect number of send failure messages logged by client",1,results.size()); - System.setProperty("qpid.flow_control_wait_failure",String.valueOf(origTimeoutValue)); - System.setProperty("qpid.flow_control_wait_notify_period","5000"); } @@ -289,8 +286,7 @@ public class ProducerFlowControlTest extends AbstractTestLogging public void testSendTimeout() throws JMSException, NamingException, AMQException, InterruptedException { - long origTimeoutValue = Long.getLong("qpid.flow_control_wait_failure",AMQSession.DEFAULT_FLOW_CONTROL_WAIT_FAILURE); - System.setProperty("qpid.flow_control_wait_failure","3000"); + setTestClientSystemProperty("qpid.flow_control_wait_failure","3000"); Session session = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -314,10 +310,6 @@ public class ProducerFlowControlTest extends AbstractTestLogging assertNotNull("No timeout exception on sending", e); - System.setProperty("qpid.flow_control_wait_failure",String.valueOf(origTimeoutValue)); - - - } private MessageSender sendMessagesAsync(final MessageProducer producer, -- cgit v1.2.1