Skip to content
Permalink
Browse files
Switch to using a temp queue, leaves broker clean when test completes.
  • Loading branch information
Timothy A. Bish committed Jan 14, 2010
1 parent db58103 commit e81c5701b022d2028d3cf0a04a272553b0304dd9
Showing 1 changed file with 5 additions and 5 deletions.
@@ -65,7 +65,7 @@ public void TestAsynchronousConsume(MsgDeliveryMode deliveryMode)
connection.Start();
using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
IDestination destination = session.CreateTemporaryQueue();
using(IMessageConsumer consumer = session.CreateConsumer(destination))
using(IMessageProducer producer = session.CreateProducer(destination))
{
@@ -95,7 +95,7 @@ public void TestCreateConsumerAfterSend(MsgDeliveryMode deliveryMode)
connection.Start();
using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
IDestination destination = session.CreateTemporaryQueue();
using(IMessageProducer producer = session.CreateProducer(destination))
{
producer.DeliveryMode = deliveryMode;
@@ -127,7 +127,7 @@ public void TestCreateConsumerBeforeSendAddListenerAfterSend(MsgDeliveryMode del
connection.Start();
using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
IDestination destination = session.CreateTemporaryQueue();
using(IMessageConsumer consumer = session.CreateConsumer(destination))
using(IMessageProducer producer = session.CreateProducer(destination))
{
@@ -158,7 +158,7 @@ public void TestAsynchronousTextMessageConsume(MsgDeliveryMode deliveryMode)
connection.Start();
using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
IDestination destination = session.CreateTemporaryQueue();
using(IMessageConsumer consumer = session.CreateConsumer(destination))
{
consumer.Listener += new MessageListener(OnMessage);
@@ -195,7 +195,7 @@ public void TestTemporaryQueueAsynchronousConsume(MsgDeliveryMode deliveryMode)
connection.Start();
using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
{
IDestination destination = SessionUtil.GetDestination(session, DESTINATION_NAME);
IDestination destination = session.CreateTemporaryQueue();
ITemporaryQueue tempReplyDestination = session.CreateTemporaryQueue();

using(IMessageConsumer consumer = session.CreateConsumer(destination))

0 comments on commit e81c570

Please sign in to comment.