activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r817759 [2/2] - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ/trunk/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ Apache.NMS.ActiveMQ/tr...
Date Tue, 22 Sep 2009 18:47:28 GMT
Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConnectionTest.cs Tue Sep 22
18:46:57 2009
@@ -43,13 +43,11 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(true)]
 		[Row(false)]
-#endif
 		public void CreateAndDisposeWithConsumer(bool disposeConsumer)
-        {
+		{
 			using(IConnection connection = CreateConnection("DisposalTestConnection"))
 			{
 				connection.Start();
@@ -66,15 +64,13 @@
 					}
 				}
 			}
-        }
+		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(true)]
 		[Row(false)]
-#endif
 		public void CreateAndDisposeWithProducer(bool disposeProducer)
-        {
+		{
 			using(IConnection connection = CreateConnection("DisposalTestConnection"))
 			{
 				connection.Start();
@@ -91,6 +87,6 @@
 					}
 				}
 			}
-        }
+		}
 	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/DurableTest.cs Tue Sep 22 18:46:57
2009
@@ -31,13 +31,11 @@
 		protected static string CONSUMER_ID = "TestDurableConsumerConsumerId";
 		protected static string DURABLE_SELECTOR = "2 > 1";
 
-#if !NET_1_1
 		[RowTest]
 		[Row(AcknowledgementMode.AutoAcknowledge)]
 		[Row(AcknowledgementMode.ClientAcknowledge)]
 		[Row(AcknowledgementMode.DupsOkAcknowledge)]
 		[Row(AcknowledgementMode.Transactional)]
-#endif
 		public void TestDurableConsumerSelectorChange(AcknowledgementMode ackMode)
 		{
 			try
@@ -113,13 +111,11 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(AcknowledgementMode.AutoAcknowledge)]
 		[Row(AcknowledgementMode.ClientAcknowledge)]
 		[Row(AcknowledgementMode.DupsOkAcknowledge)]
 		[Row(AcknowledgementMode.Transactional)]
-#endif
 		public void TestDurableConsumer(AcknowledgementMode ackMode)
 		{
 			try

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MapMessageTest.cs Tue Sep 22
18:46:57 2009
@@ -44,11 +44,9 @@
 		protected float m = 2.1F;
 		protected double n = 2.3;
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void SendReceiveMapMessage(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -121,11 +119,9 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void SendReceiveNestedMapMessage(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MemoryUsageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MemoryUsageTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MemoryUsageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MemoryUsageTest.cs Tue Sep 22
18:46:57 2009
@@ -27,84 +27,83 @@
 	public class MemoryUsageTest : NMSTestSupport
 	{
 
-        [Test]
-        public void TestConstructors()
-        {
-            MemoryUsage usage = new MemoryUsage();
-            
-            Assert.That(usage.Limit == 0);
-            Assert.That(usage.Usage == 0);
-
-            usage = new MemoryUsage(1024);
-            
-            Assert.That(usage.Limit == 1024);
-            Assert.That(usage.Usage == 0);        
-        }
-        
-        [Test]
-        public void TestUsage() {
-        
-            MemoryUsage usage1 = new MemoryUsage( 2048 );
-        
-            Assert.That( !usage1.IsFull() );
-            Assert.That( usage1.Usage == 0 );
-        
-            usage1.IncreaseUsage( 1024 );
-        
-            Assert.That( !usage1.IsFull() );
-            Assert.That( usage1.Usage == 1024 );
-        
-            usage1.DecreaseUsage( 512 );
-        
-            Assert.That( !usage1.IsFull() );
-            Assert.That( usage1.Usage == 512 );
-        
-            usage1.Usage = 2048;
-        
-            Assert.That( usage1.IsFull() );
-            Assert.That( usage1.Usage == 2048 );
-        
-            usage1.IncreaseUsage( 1024 );
-            Assert.That( usage1.IsFull() );
-            Assert.That( usage1.Usage == 3072 );
-        }
-        
-        [Test]
-        public void TestTimedWait() {
-        
-            MemoryUsage usage = new MemoryUsage( 2048 );
-            usage.IncreaseUsage( 5072 );
-        
-            DateTime start = DateTime.Now;
-        
-            usage.WaitForSpace( TimeSpan.FromMilliseconds(150) );
-        
-            DateTime end = DateTime.Now;
-            
-            TimeSpan timePassed = end - start;
-        
-            Assert.That( timePassed.TotalMilliseconds >= 125 );
-        }
-        
-        [Test]
-        public void TestWait() {
-        
-            MemoryUsage usage = new MemoryUsage( 2048 );
-            usage.IncreaseUsage( 5072 );
-
-            Thread thread1 = new Thread(() =>
-            {
-                Thread.Sleep( 100 );
-                usage.DecreaseUsage( usage.Usage );
-            });
-
-            thread1.Start();
-        
-            usage.WaitForSpace();
-            Assert.That( usage.Usage == 0 );
-        
-            thread1.Join();
-        
-        }        
+		[Test]
+		public void TestConstructors()
+		{
+			MemoryUsage usage = new MemoryUsage();
+
+			Assert.That(usage.Limit == 0);
+			Assert.That(usage.Usage == 0);
+
+			usage = new MemoryUsage(1024);
+
+			Assert.That(usage.Limit == 1024);
+			Assert.That(usage.Usage == 0);
+		}
+
+		[Test]
+		public void TestUsage()
+		{
+			MemoryUsage usage1 = new MemoryUsage( 2048 );
+
+			Assert.That( !usage1.IsFull() );
+			Assert.That( usage1.Usage == 0 );
+
+			usage1.IncreaseUsage( 1024 );
+
+			Assert.That( !usage1.IsFull() );
+			Assert.That( usage1.Usage == 1024 );
+
+			usage1.DecreaseUsage( 512 );
+
+			Assert.That( !usage1.IsFull() );
+			Assert.That( usage1.Usage == 512 );
+
+			usage1.Usage = 2048;
+
+			Assert.That( usage1.IsFull() );
+			Assert.That( usage1.Usage == 2048 );
+
+			usage1.IncreaseUsage( 1024 );
+			Assert.That( usage1.IsFull() );
+			Assert.That( usage1.Usage == 3072 );
+		}
+
+		[Test]
+		public void TestTimedWait()
+		{
+			MemoryUsage usage = new MemoryUsage( 2048 );
+			usage.IncreaseUsage( 5072 );
+
+			DateTime start = DateTime.Now;
+
+			usage.WaitForSpace( TimeSpan.FromMilliseconds(150) );
+
+			DateTime end = DateTime.Now;
+
+			TimeSpan timePassed = end - start;
+
+			Assert.That( timePassed.TotalMilliseconds >= 125 );
+		}
+
+		[Test]
+		public void TestWait()
+		{
+			MemoryUsage usage = new MemoryUsage( 2048 );
+			usage.IncreaseUsage( 5072 );
+
+			Thread thread1 = new Thread(delegate ()
+			{
+				Thread.Sleep( 100 );
+				usage.DecreaseUsage( usage.Usage );
+			});
+
+			thread1.Start();
+
+			usage.WaitForSpace();
+			Assert.That( usage.Usage == 0 );
+
+			thread1.Join();
+		}
 	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageSelectorTest.cs Tue Sep
22 18:46:57 2009
@@ -36,13 +36,11 @@
 		private int receivedNonIgnoredMsgCount = 0;
 		private int receivedIgnoredMsgCount = 0;
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent, QUEUE_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.NonPersistent, QUEUE_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.Persistent, TOPIC_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.NonPersistent, TOPIC_DESTINATION_NAME)]
-#endif
 		public void FilterIgnoredMessagesTest(MsgDeliveryMode deliveryMode, string destinationName)
 		{
 			using(IConnection connection1 = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/MessageTest.cs Tue Sep 22 18:46:57
2009
@@ -43,11 +43,9 @@
 		protected float		m = 2.1F;
 		protected double	n = 2.3;
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void SendReceiveMessageProperties(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSPropertyTest.cs Tue Sep 22
18:46:57 2009
@@ -36,11 +36,9 @@
 		protected String groupID = "BarGroup";
 		protected int groupSeq = 1;
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void SendReceiveNMSProperties(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TempDestinationDeletionTest.cs
Tue Sep 22 18:46:57 2009
@@ -32,7 +32,6 @@
 		protected const string TEMP_TOPIC_DESTINATION_NAME = "temp-topic://AutoDeleteTempTopic";
 		protected const string TEST_CLIENT_ID = "TempDestinationClientId";
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent, QUEUE_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.NonPersistent, QUEUE_DESTINATION_NAME)]
@@ -43,7 +42,6 @@
 		[Row(MsgDeliveryMode.NonPersistent, TEMP_QUEUE_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.Persistent, TEMP_TOPIC_DESTINATION_NAME)]
 		[Row(MsgDeliveryMode.NonPersistent, TEMP_TOPIC_DESTINATION_NAME)]
-#endif
 		public void TempDestinationDeletionTest(MsgDeliveryMode deliveryMode, string destinationName)
 		{
 			using(IConnection connection1 = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TextMessage.cs Tue Sep 22 18:46:57
2009
@@ -27,11 +27,9 @@
 		protected static string DESTINATION_NAME = "TextMessageDestination";
 		protected static string TEST_CLIENT_ID = "TextMessageClientId";
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void SendReceiveTextMessage(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/TransactionTest.cs Tue Sep 22
18:46:57 2009
@@ -30,11 +30,9 @@
 		protected static string TEST_CLIENT_ID = "TransactionTestClientId";
 		protected static string TEST_CLIENT_ID2 = "TransactionTestClientId2";
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestSendRollback(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -75,11 +73,9 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestSendSessionClose(MsgDeliveryMode deliveryMode)
 		{
 			ITextMessage firstMsgSend;
@@ -148,11 +144,9 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestReceiveRollback(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -193,11 +187,9 @@
 		}
 
 
-#if !NET_1_1
 		[RowTest]
 		[Row(MsgDeliveryMode.Persistent)]
 		[Row(MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestReceiveTwoThenRollback(MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -239,13 +231,11 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.NonPersistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestSendCommitNonTransaction(AcknowledgementMode ackMode, MsgDeliveryMode deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -274,13 +264,11 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.NonPersistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestReceiveCommitNonTransaction(AcknowledgementMode ackMode, MsgDeliveryMode
deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))
@@ -319,13 +307,11 @@
 			}
 		}
 
-#if !NET_1_1
 		[RowTest]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.AutoAcknowledge, MsgDeliveryMode.NonPersistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.Persistent)]
 		[Row(AcknowledgementMode.ClientAcknowledge, MsgDeliveryMode.NonPersistent)]
-#endif
 		public void TestReceiveRollbackNonTransaction(AcknowledgementMode ackMode, MsgDeliveryMode
deliveryMode)
 		{
 			using(IConnection connection = CreateConnection(TEST_CLIENT_ID))

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms-test.csproj Tue Sep 22 18:46:57 2009
@@ -87,6 +87,7 @@
     <Compile Include="src\test\csharp\EndianBinaryReaderTest.cs" />
     <Compile Include="src\test\csharp\EndianBinaryWriterTest.cs" />
     <Compile Include="src\test\csharp\EndianTest.cs" />
+    <Compile Include="src\test\csharp\MemoryUsageTest.cs" />
     <Compile Include="src\test\csharp\NMSPropertyTest.cs" />
     <Compile Include="src\test\csharp\NMSTestSupport.cs">
       <SubType>Code</SubType>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj?rev=817759&r1=817758&r2=817759&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2008-nms.csproj Tue Sep 22 18:46:57 2009
@@ -84,14 +84,13 @@
     <Compile Include="src\main\csharp\TransactionInProgressException.cs" />
     <Compile Include="src\main\csharp\TransactionRolledBackException.cs" />
     <Compile Include="src\main\csharp\Util\Atomic.cs" />
-    <Compile Include="src\main\csharp\Util\AtomicBoolean.cs" />
-    <Compile Include="src\main\csharp\Util\AtomicReference.cs" />
     <Compile Include="src\main\csharp\Util\Convert.cs" />
     <Compile Include="src\main\csharp\Util\CountDownLatch.cs" />
     <Compile Include="src\main\csharp\Util\DateUtils.cs" />
     <Compile Include="src\main\csharp\Util\EndianBinaryReader.cs" />
     <Compile Include="src\main\csharp\Util\EndianBinaryWriter.cs" />
     <Compile Include="src\main\csharp\Util\EndianSupport.cs" />
+    <Compile Include="src\main\csharp\Util\MemoryUsage.cs" />
     <Compile Include="src\main\csharp\Util\MessagePropertyHelper.cs" />
     <Compile Include="src\main\csharp\Util\PrimitiveMap.cs" />
     <Compile Include="src\main\csharp\Util\SessionUtils.cs" />



Mime
View raw message