[jboss-cvs] JBossAS SVN: r87020 - branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 8 20:50:45 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-04-08 20:50:45 -0400 (Wed, 08 Apr 2009)
New Revision: 87020
Modified:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
JBAS-6736, Add more topic operation tests
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-04-09 00:12:13 UTC (rev 87019)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-04-09 00:50:45 UTC (rev 87020)
@@ -120,6 +120,7 @@
suite.addTest(new JmsDestinationUnitTestCase("testQueueOperations"));
suite.addTest(new JmsDestinationUnitTestCase("testRemoveQueue"));
suite.addTest(new JmsDestinationUnitTestCase("testCreateTopic"));
+ suite.addTest(new JmsDestinationUnitTestCase("testTopicSubscriptions"));
suite.addTest(new JmsDestinationUnitTestCase("testTopicMetrics"));
suite.addTest(new JmsDestinationUnitTestCase("testTopicOperations"));
suite.addTest(new JmsDestinationUnitTestCase("testRemoveTopic"));
@@ -312,7 +313,7 @@
}
/**
- * Run after testCreateTopic to validate the
+ * Run after testCreateTopic to validate the topic subscriptions, list msgs.
*/
public void testTopicSubscriptions()
throws Exception
@@ -355,6 +356,28 @@
assertNotNull(listNonDurableSubscriptions);
MetaValue subscriptions = listNonDurableSubscriptions.invoke();
log.info(subscriptions);
+ assertTrue(subscriptions instanceof CollectionValue);
+ CollectionValue subscriptionsCV = (CollectionValue) subscriptions;
+ assertTrue("subscriptions.size > 0", subscriptionsCV.getSize() > 0);
+ MetaValue[] subscriptionsMVs = subscriptionsCV.getElements();
+ for(MetaValue mv : subscriptionsMVs)
+ {
+ CompositeValue cv = (CompositeValue) mv;
+ MetaValue name = cv.get("name");
+ log.info(name);
+ MetaValue clientID = cv.get("clientID");
+ log.info(clientID);
+ MetaValue durable = cv.get("durable");
+ log.info(durable);
+ MetaValue selector = cv.get("selector");
+ log.info(selector);
+ MetaValue id = cv.get("id");
+ log.info(id);
+ MetaValue maxSize = cv.get("maxSize");
+ log.info(maxSize);
+ MetaValue messageCount = cv.get("messageCount");
+ log.info(messageCount);
+ }
}
More information about the jboss-cvs-commits
mailing list