diff options
| author | Rupert Smith <rupertlssmith@apache.org> | 2008-01-22 11:54:54 +0000 |
|---|---|---|
| committer | Rupert Smith <rupertlssmith@apache.org> | 2008-01-22 11:54:54 +0000 |
| commit | c076635c6b7e6494026ca398d124f95e66c13e06 (patch) | |
| tree | 8b787020357b497288a0c3bd0a19912c56027a32 /dotnet/Qpid.Integration.Tests/testcases | |
| parent | e8340832149070f8254eabee87276f2a415aecac (diff) | |
| download | qpid-python-c076635c6b7e6494026ca398d124f95e66c13e06.tar.gz | |
Qpid-730. Removed durable and subscription name from consumer builder, as they are not to do with consume but queue declaration. Durable subscribers must provide their own fixed queue names.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@614184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Integration.Tests/testcases')
| -rw-r--r-- | dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs | 29 | ||||
| -rw-r--r-- | dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs | 2 |
2 files changed, 22 insertions, 9 deletions
diff --git a/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs b/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs index 971fa0b773..c464c3e281 100644 --- a/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs +++ b/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs @@ -104,6 +104,16 @@ namespace Apache.Qpid.Integration.Tests.testcases }
/// <summary> Sets up the nth test end-point. </summary>
+ ///
+ /// <param name="n">The index of the test end-point to set up.</param>
+ /// <param name="producer"><tt>true</tt> to set up a producer on the end-point.</param>
+ /// <param name="consumer"><tt>true</tt> to set up a consumer on the end-point.</param>
+ /// <param name="routingKey">The routing key for the producer to send on.</param>
+ /// <param name="ackMode">The ack mode for the end-points channel.</param>
+ /// <param name="transacted"><tt>true</tt> to use transactions on the end-points channel.</param>
+ /// <param name="exchangeName">The exchange to produce or consume on.</param>
+ /// <param name="durable"><tt>true</tt> to declare the consumers queue as durable.</param>
+ /// <param name="subscriptionName">If durable is true, the fixed unique queue name to use.</param>
public void SetUpEndPoint(int n, bool producer, bool consumer, string routingKey, AcknowledgeMode ackMode, bool transacted,
string exchangeName, bool durable, string subscriptionName)
{
@@ -121,19 +131,22 @@ namespace Apache.Qpid.Integration.Tests.testcases if (consumer)
{
- string queueName = testChannel[n].GenerateUniqueName();
- testChannel[n].DeclareQueue(queueName, false, true, true);
- testChannel[n].Bind(queueName, ExchangeNameDefaults.DIRECT, routingKey);
- MessageConsumerBuilder consumerBuilder = testChannel[n].CreateConsumerBuilder(queueName);
+ string queueName;
+ // Use the subscription name as the queue name if the subscription is durable, otherwise use a generated name.
if (durable)
{
- consumerBuilder
- .WithSubscriptionName(subscriptionName)
- .WithDurable(true);
+ queueName = subscriptionName;
+ }
+ else
+ {
+ queueName = testChannel[n].GenerateUniqueName();
}
- testConsumer[n] = consumerBuilder.Create();
+ testChannel[n].DeclareQueue(queueName, durable, true, true);
+ testChannel[n].Bind(queueName, exchangeName, routingKey);
+
+ testConsumer[n] = testChannel[n].CreateConsumerBuilder(queueName).Create();
}
}
diff --git a/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs b/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs index 6b0abffe5e..60b1687ef6 100644 --- a/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs +++ b/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs @@ -32,7 +32,7 @@ namespace Apache.Qpid.Integration.Tests.testcases /// a subscription that is currently off-line, and checking that the subscriber gets all of its messages when it
/// does come on-line.
///
- /// <p><table id="crc"><caption>CRC Card</caption>
+ /// <p/><table id="crc"><caption>CRC Card</caption>
/// <tr><th> Responsibilities <th> Collaborations
/// <tr><td>
/// </table>
|
