Author: clebert.suconic(a)jboss.com
Date: 2010-12-27 16:56:59 -0500 (Mon, 27 Dec 2010)
New Revision: 10078
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
Log:
fixing tests
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-27
21:47:36 UTC (rev 10077)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-27
21:56:59 UTC (rev 10078)
@@ -112,6 +112,12 @@
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
+
+ /** Number of consumers used by the test itself */
+ protected int getNumberOfConsumers()
+ {
+ return 0;
+ }
public void testGetVersion() throws Exception
{
@@ -411,16 +417,15 @@
// create a consumer will create a Core queue bound to the topic address
MessageConsumer cons = session.createConsumer(topic);
- System.out.println("jsonString:" + control.listAllConsumersAsJSON());
JSONArray jsonArray = new JSONArray(control.listAllConsumersAsJSON());
- assertEquals(1, jsonArray.length());
+ assertEquals(1 + getNumberOfConsumers(), jsonArray.length());
cons.close();
jsonArray = new JSONArray(control.listAllConsumersAsJSON());
- assertEquals(0, jsonArray.length());
+ assertEquals(getNumberOfConsumers(), jsonArray.length());
String topicAddress =
HornetQDestination.createTopicAddressFromName(topicName).toString();
AddressControl addressControl = (AddressControl)server.getManagementService()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2010-12-27
21:47:36 UTC (rev 10077)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2010-12-27
21:56:59 UTC (rev 10078)
@@ -60,7 +60,13 @@
// Constructors --------------------------------------------------
// JMSServerControlTest overrides --------------------------------
+ @Override
+ protected int getNumberOfConsumers()
+ {
+ return 1;
+ }
+
@Override
protected void setUp() throws Exception
{
Show replies by date