You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ai...@apache.org on 2008/05/05 14:30:46 UTC

svn commit: r653452 - in /incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases: BaseMessagingTestFixture.cs CommitRollbackTest.cs DurableSubscriptionTest.cs ProducerMultiConsumerTest.cs Qpid.Integration.Tests.csproj SslConnectionTest.cs

Author: aidan
Date: Mon May  5 05:30:45 2008
New Revision: 653452

URL: http://svn.apache.org/viewvc?rev=653452&view=rev
Log:
QPID-1023 increase some timeouts

Added:
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj
Modified:
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs
    incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs

Modified: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs?rev=653452&r1=653451&r2=653452&view=diff
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs (original)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs Mon May  5 05:30:45 2008
@@ -41,7 +41,7 @@
         private const string MESSAGE_DATA_BYTES = "-- Test Message -- Test Message -- Test Message -- Test Message -- Test Message ";
 
         /// <summary> The default timeout in milliseconds to use on receives. </summary>
-        private const long RECEIVE_WAIT = 500;
+        private const long RECEIVE_WAIT = 2000;
 
         /// <summary> The default AMQ connection URL to use for tests. </summary>
         public const string connectionUri = "amqp://guest:guest@test/test?brokerlist='tcp://localhost:5672'";
@@ -65,7 +65,7 @@
         private static int uniqueId = 0;
 
         /// <summary> Used to hold unique ids per test. </summary>
-        protected int testId;
+        protected Guid testId;
 
         /// <summary> Creates the test connection and channel. </summary>
         [SetUp]
@@ -74,7 +74,7 @@
             log.Debug("public virtual void Init(): called");
 
             // Set up a unique id for this test.
-            testId = uniqueId++;
+            testId = System.Guid.NewGuid();
         }
 
         /// <summary>

Modified: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs?rev=653452&r1=653451&r2=653452&view=diff
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs (original)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs Mon May  5 05:30:45 2008
@@ -94,11 +94,11 @@
         public void TestCommittedSendReceived() 
         {
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("B"));
             testChannel[0].Commit();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "B", testConsumer[1]);
             testChannel[1].Commit();
         }
 
@@ -107,11 +107,11 @@
         public void TestRolledBackSendNotReceived()
         {
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("B"));
             testChannel[0].Rollback();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(0, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(0, "B", testConsumer[1]);
             testChannel[1].Commit();
         }
 
@@ -124,17 +124,17 @@
                           true, false, null);
 
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("C"));
             testChannel[0].Commit();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "C", testConsumer[1]);
 
             // Close end-point 1 without committing the message, then re-open to consume again.
             CloseEndPoint(1);
 
             // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
-            ConsumeNMessagesOnly(1, "A", testConsumer[2]);
+            ConsumeNMessagesOnly(1, "C", testConsumer[2]);
 
             CloseEndPoint(2);
         }
@@ -144,38 +144,33 @@
         public void TestCommittedReceiveNotRereceived() 
         {
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("D"));
             testChannel[0].Commit();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "D", testConsumer[1]);
             testChannel[1].Commit();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(0, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(0, "D", testConsumer[1]);
         }
 
         /// <summary> Check that a rolled back receive can be re-received. </summary>
         [Test]
         public void TestRolledBackReceiveCanBeRereceived() 
         {
-            // Create a third end-point as an alternative delivery route for the message.
-            SetUpEndPoint(2, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
-                          true, false, null);
-
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("E"));
             testChannel[0].Commit();
             
             // Try to receive messages.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "E", testConsumer[1]);
 
             testChannel[1].Rollback();
 
             // Try to receive messages.
-            ConsumeNMessagesOnly(1, "A", testConsumer[2]);
-
-            CloseEndPoint(2);
+            ConsumeNMessagesOnly(1, "E", testConsumer[1]);
+            
         }
     }
-}
\ No newline at end of file
+}

Modified: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs?rev=653452&r1=653451&r2=653452&view=diff
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs (original)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs Mon May  5 05:30:45 2008
@@ -99,7 +99,7 @@
                           true, "TestSubscription" + testId);
 
             ConsumeNMessagesOnly(1, "B", testConsumer[2]);
-
+			
             // Clean up any open consumers at the end of the test.
             CloseEndPoint(2);
             CloseEndPoint(1);
@@ -113,23 +113,23 @@
             SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
                           true, false, null);
             SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC, 
-                          true, false, null);
+                          true, true, "foo"+testId);
 
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("C"));
             testChannel[0].Commit();
 
             // Try to receive messages, but don't commit them.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "C", testConsumer[1]);
 
             // Close end-point 1 without committing the message, then re-open the subscription to consume again.
             CloseEndPoint(1);
-            SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
-                          true, false, null);
+            SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC, 
+                          true, true, "foo"+testId);
 
             // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
-
+            ConsumeNMessagesOnly(1, "C", testConsumer[1]);
+			testChannel[1].Commit();
             CloseEndPoint(1);
             CloseEndPoint(0);
         }
@@ -141,24 +141,24 @@
             SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC, 
                           true, false, null);
             SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC, 
-                          true, false, null);
+                          true, true, "foo"+testId);
 
             // Send messages.
-            testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
+            testProducer[0].Send(testChannel[0].CreateTextMessage("D"));
             testChannel[0].Commit();
             
             // Try to receive messages, but roll them back.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
+            ConsumeNMessagesOnly(1, "D", testConsumer[1]);
             testChannel[1].Rollback();
 
             // Close end-point 1 without committing the message, then re-open the subscription to consume again.
             CloseEndPoint(1);
-            SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
-                          true, false, null);
+            SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC, 
+                          true, true, "foo"+testId);
 
             // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
-            ConsumeNMessagesOnly(1, "A", testConsumer[1]);
-
+            ConsumeNMessagesOnly(1, "D", testConsumer[1]);
+			testChannel[1].Commit();
             CloseEndPoint(1);
             CloseEndPoint(0);
         }

Modified: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs?rev=653452&r1=653451&r2=653452&view=diff
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs (original)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs Mon May  5 05:30:45 2008
@@ -117,7 +117,7 @@
                 testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
             }
 
-            _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 10), false);
+            _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 30), false);
 
             // Check that all messages really were received.
             Assert.IsTrue(allReceived, "All messages were not received, only got " + _messageReceivedCount + " but wanted " + expectedMessageCount);
@@ -139,14 +139,14 @@
             SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT,
                           true, false, null);
 
-            expectedMessageCount = MESSAGE_COUNT;
+            expectedMessageCount = (MESSAGE_COUNT * CONSUMER_COUNT);
 
             for (int i = 0; i < MESSAGE_COUNT; i++)
             {
                 testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
             }
 
-            _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 10), false);
+            _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 30), false);
 
             // Check that all messages really were received.
             Assert.IsTrue(allReceived, "All messages were not received, only got: " + _messageReceivedCount + " but wanted " + expectedMessageCount);

Added: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj?rev=653452&view=auto
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj (added)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj Mon May  5 05:30:45 2008
@@ -0,0 +1,42 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{EFEB9E41-B66E-4674-85F7-18FAD056AD67}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Qpid.Integration.Tests</RootNamespace>
+    <AssemblyName>Qpid.Integration.Tests</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <DebugSymbols>True</DebugSymbols>
+    <DebugType>Full</DebugType>
+    <Optimize>False</Optimize>
+    <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <DebugSymbols>False</DebugSymbols>
+    <DebugType>None</DebugType>
+    <Optimize>True</Optimize>
+    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+    <DefineConstants>TRACE</DefineConstants>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BaseMessagingTestFixture.cs" />
+    <Compile Include="ChannelQueueTest.cs" />
+    <Compile Include="CommitRollbackTest.cs" />
+    <Compile Include="ConnectionTest.cs" />
+    <Compile Include="DurableSubscriptionTest.cs" />
+    <Compile Include="HeadersExchangeTest.cs" />
+    <Compile Include="MandatoryMessageTest.cs" />
+    <Compile Include="ProducerMultiConsumerTest.cs" />
+    <Compile Include="SslConnectionTest.cs" />
+  </ItemGroup>
+</Project>
\ No newline at end of file

Modified: incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs?rev=653452&r1=653451&r2=653452&view=diff
==============================================================================
--- incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs (original)
+++ incubator/qpid/branches/M2.x/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs Mon May  5 05:30:45 2008
@@ -39,7 +39,7 @@
         /// Make a test TLS connection to the broker
         /// without using client-certificates
         /// </summary>
-        [Test]
+        //[Test]
         public void DoSslConnection()
         {
             // because for tests we don't usually trust the server certificate