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/08 17:09:19 UTC

svn commit: r654545 - /incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs

Author: aidan
Date: Thu May  8 08:09:17 2008
New Revision: 654545

URL: http://svn.apache.org/viewvc?rev=654545&view=rev
Log:
QPID-1038 add a mixed send/recieve/rollback test

Modified:
    incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs?rev=654545&r1=654544&r2=654545&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs Thu May  8 08:09:17 2008
@@ -58,7 +58,7 @@
             // Create one producer and one consumer, p2p, tx, consumer with queue bound to producers routing key.
             SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
                           true, false, null);
-            SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
+            SetUpEndPoint(1, true, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT, 
                           true, false, null);
         }
 
@@ -172,5 +172,22 @@
             ConsumeNMessagesOnly(1, "E", testConsumer[1]);
             
         }
+        
+        [Test]
+        public void TestReceiveAndSendRollback()
+        {
+        	// Send messages
+        	testProducer[0].Send(testChannel[0].CreateTextMessage("F"));
+            testChannel[0].Commit();
+            
+            // Try to receive messages.
+            ConsumeNMessagesOnly(1, "F", testConsumer[1]);
+			testProducer[1].Send(testChannel[1].CreateTextMessage("G"));
+            testChannel[1].Rollback();
+
+            // Try to receive messages.
+            ConsumeNMessagesOnly(1, "F", testConsumer[1]);
+            
+        }
     }
 }