diff options
| author | Steven Shaw <steshaw@apache.org> | 2006-11-28 19:12:37 +0000 |
|---|---|---|
| committer | Steven Shaw <steshaw@apache.org> | 2006-11-28 19:12:37 +0000 |
| commit | 16f6727812c3c86b8be3e6c306408e9c6cc90633 (patch) | |
| tree | 8e9edb6637ff6af93980d6962172a646242c3c74 /dotnet/Qpid.Client.Tests/failover | |
| parent | f1503a0dd2aa10a83a18550dcde4843dd8aef0cb (diff) | |
| download | qpid-python-16f6727812c3c86b8be3e6c306408e9c6cc90633.tar.gz | |
Initial changes to record and replay frames on fail over.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client.Tests/failover')
| -rw-r--r-- | dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs index ad1570ed14..4e10bcc98e 100644 --- a/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs +++ b/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs @@ -33,7 +33,7 @@ namespace Qpid.Client.Tests.failover { private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverTxTest)); - const int NUM_ITERATIONS = 3; + const int NUM_ITERATIONS = 10; const int NUM_MESSAGES = 10; const int SLEEP_MILLIS = 500; @@ -59,17 +59,17 @@ namespace Qpid.Client.Tests.failover _log.Info("connectionInfo = " + connectionInfo); _log.Info("connection.asUrl = " + _connection.toURL()); - IChannel session = _connection.CreateChannel(false, AcknowledgeMode.NoAcknowledge); + IChannel channel = _connection.CreateChannel(false, AcknowledgeMode.NoAcknowledge); - string queueName = session.GenerateUniqueName(); + string queueName = channel.GenerateUniqueName(); // Queue.Declare - session.DeclareQueue(queueName, false, true, true); + channel.DeclareQueue(queueName, false, true, true); // No need to call Queue.Bind as automatically bound to default direct exchange. -// channel.Bind(queueName, exchangeName, routingKey); + channel.Bind(queueName, "amq.direct", queueName); - session.CreateConsumerBuilder(queueName).Create().OnMessage = new MessageReceivedDelegate(onMessage); + channel.CreateConsumerBuilder(queueName).Create().OnMessage = new MessageReceivedDelegate(onMessage); _connection.Start(); @@ -83,8 +83,8 @@ namespace Qpid.Client.Tests.failover { _log.Info("sendInTx"); bool transacted = false; - IChannel session = _connection.CreateChannel(transacted, AcknowledgeMode.NoAcknowledge); - IMessagePublisher publisher = session.CreatePublisherBuilder() + IChannel channel = _connection.CreateChannel(transacted, AcknowledgeMode.NoAcknowledge); + IMessagePublisher publisher = channel.CreatePublisherBuilder() .withRoutingKey(routingKey) .Create(); @@ -92,12 +92,12 @@ namespace Qpid.Client.Tests.failover { for (int j = 1; j <= NUM_MESSAGES; ++j) { - ITextMessage msg = session.CreateTextMessage("Tx=" + i + " msg=" + j); + ITextMessage msg = channel.CreateTextMessage("Tx=" + i + " msg=" + j); _log.Info("sending message = " + msg.Text); publisher.Send(msg); Thread.Sleep(SLEEP_MILLIS); } - if (transacted) session.Commit(); + if (transacted) channel.Commit(); } } |
