User: chirino
Date: 01/12/08 21:55:06
Modified: src/main/org/jboss/test/jbossmq/test
JBossMQUnitTestCase.java
Log:
updated the noLocal test
Revision Changes Path
1.7 +8 -6
jbosstest/src/main/org/jboss/test/jbossmq/test/JBossMQUnitTestCase.java
Index: JBossMQUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmq/test/JBossMQUnitTestCase.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JBossMQUnitTestCase.java 2001/12/09 04:30:54 1.6
+++ JBossMQUnitTestCase.java 2001/12/09 05:55:06 1.7
@@ -462,14 +462,14 @@
// We don't want local messages on this topic.
TopicSession session1 = topicConnection1.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
Topic topic = (Topic)context.lookup(TEST_TOPIC);
- TopicSubscriber sub = session1.createSubscriber(topic, null, true);
+ TopicSubscriber subscriber1 = session1.createSubscriber(topic, null, true);
TopicPublisher sender1 = session1.createPublisher(topic);
//Now a sender
TopicSession session2 = topicConnection2.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
TopicPublisher sender2 = session2.createPublisher(topic);
- drainMessagesForTopic(sub);
+ drainMessagesForTopic(subscriber1);
//send some messages
sender1.publish(session1.createTextMessage("Local Message"));
@@ -477,24 +477,26 @@
// Get the messages, we should get the remote message
// but not the local message
- TextMessage msg1 = (TextMessage)sub.receive(2000);
+ TextMessage msg1 = (TextMessage)subscriber1.receive(2000);
if( msg1 == null ) {
fail("Did not get any messages");
} else {
+ getLog().debug("Got message: "+msg1);
if(msg1.getText().equals("Local Message")) {
fail("Got a local message");
}
- TextMessage msg2 = (TextMessage)sub.receive(2000);
+ TextMessage msg2 = (TextMessage)subscriber1.receive(2000);
if( msg2 != null ) {
+ getLog().debug("Got message: "+msg2);
fail("Got an extra message. msg1:"+msg1+", msg2:"+msg2);
- }
+ }
}
topicConnection1.stop();
topicConnection1.close();
topicConnection2.stop();
topicConnection2.close();
- getLog().debug("Topic test passed");
+ getLog().debug("TopicNoLocal test passed");
}
public static Test suite() throws Exception
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development