diff options
author | Steven Shaw <steshaw@apache.org> | 2006-11-28 23:56:14 +0000 |
---|---|---|
committer | Steven Shaw <steshaw@apache.org> | 2006-11-28 23:56:14 +0000 |
commit | 40ae7414f695ac2bc579229df7af415a3a5a3775 (patch) | |
tree | d11d609fe5dfa2deffac9f98c1eced7c856ed05e /dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs | |
parent | fabf031b77cbf1784a25039fc79bcb21b820d4b8 (diff) | |
download | qpid-python-40ae7414f695ac2bc579229df7af415a3a5a3775.tar.gz |
QPID-135 Added Rollback support
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs')
-rw-r--r-- | dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs index 15be584031..f4facf80ad 100644 --- a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs +++ b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs @@ -34,7 +34,8 @@ namespace Qpid.Client.Tests.failover private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverTxTest)); const int NUM_ITERATIONS = 10; - const int NUM_MESSAGES = 10; + const int NUM_COMMITED_MESSAGES = 10; + const int NUM_ROLLEDBACK_MESSAGES = 5; const int SLEEP_MILLIS = 500; AMQConnection _connection; @@ -92,9 +93,18 @@ namespace Qpid.Client.Tests.failover for (int i = 1; i <= NUM_ITERATIONS; ++i) { - for (int j = 1; j <= NUM_MESSAGES; ++j) + for (int j = 1; j <= NUM_ROLLEDBACK_MESSAGES; ++j) { - ITextMessage msg = publishingChannel.CreateTextMessage("Tx=" + i + " msg=" + j); + ITextMessage msg = publishingChannel.CreateTextMessage("Tx=" + i + " rolledBackMsg=" + j); + _log.Info("sending message = " + msg.Text); + publisher.Send(msg); + Thread.Sleep(SLEEP_MILLIS); + } + if (transacted) publishingChannel.Rollback(); + + for (int j = 1; j <= NUM_COMMITED_MESSAGES; ++j) + { + ITextMessage msg = publishingChannel.CreateTextMessage("Tx=" + i + " commitedMsg=" + j); _log.Info("sending message = " + msg.Text); publisher.Send(msg); Thread.Sleep(SLEEP_MILLIS); |