activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r989909 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
Date Thu, 26 Aug 2010 20:02:27 GMT
Author: tabish
Date: Thu Aug 26 20:02:26 2010
New Revision: 989909

URL: http://svn.apache.org/viewvc?rev=989909&view=rev
Log:
fix: https://issues.apache.org/activemq/browse/AMQNET-276

Fix the test to not use same Client Id on each test, and enforce the use of a Topic as a Queue
isn't needed and messages get left unprocessed if the client fails one of the tests.

Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs?rev=989909&r1=989908&r2=989909&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ForgeinMessageTransformationTest.cs
Thu Aug 26 20:02:26 2010
@@ -27,8 +27,7 @@ namespace Apache.NMS.Test
 	[TestFixture]
 	public class ForeignMessageTransformationTest : NMSTestSupport
 	{
-		protected static string DESTINATION_NAME = "MessageTransformationDestination";
-		protected static string TEST_CLIENT_ID = "MessageTransformationClientId";
+		protected static string DESTINATION_NAME = "topic://MessageTransformationDestination";
 		
 		private string propertyName = "Test-Property";
 		private string propertyValue = "Test-Property-Value";
@@ -52,12 +51,12 @@ namespace Apache.NMS.Test
         private float m = 2.1F;
         private double n = 2.3;
 
-		[Test]
+		[Test]		
 		public void SendReceiveForeignMessageTest(
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
 			MsgDeliveryMode deliveryMode)
 		{
-			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			using(IConnection connection = CreateConnection())
 			{
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
@@ -87,12 +86,12 @@ namespace Apache.NMS.Test
 			}
 		}
 		
-		[Test]
+		[Test]		
 		public void SendReceiveForeignTextMessageTest(
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
 			MsgDeliveryMode deliveryMode)
 		{
-			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			using(IConnection connection = CreateConnection())
 			{
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
@@ -131,7 +130,7 @@ namespace Apache.NMS.Test
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
 			MsgDeliveryMode deliveryMode)
 		{
-			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			using(IConnection connection = CreateConnection())
 			{
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
@@ -148,7 +147,7 @@ namespace Apache.NMS.Test
 						producer.Send(request);
 
 						IBytesMessage message = consumer.Receive(receiveTimeout) as IBytesMessage;
-						Assert.IsNotNull(message, "No message returned!");
+						Assert.IsNotNull(message, "No message returned!");	
 						Assert.AreEqual(request.Properties.Count, message.Properties.Count, "Invalid number
of properties.");
 						Assert.AreEqual(deliveryMode, message.NMSDeliveryMode, "NMSDeliveryMode does not match");
 						
@@ -172,7 +171,7 @@ namespace Apache.NMS.Test
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
 			MsgDeliveryMode deliveryMode)
 		{
-			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			using(IConnection connection = CreateConnection())
 			{
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))
@@ -212,7 +211,7 @@ namespace Apache.NMS.Test
 			[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)]
 			MsgDeliveryMode deliveryMode)
 		{
-			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
+			using(IConnection connection = CreateConnection())
 			{
 				connection.Start();
 				using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge))



Mime
View raw message