summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-05-07 13:56:09 +0000
committerAidan Skinner <aidan@apache.org>2008-05-07 13:56:09 +0000
commit67e4b64865eec3cbf91a44c422f990b726bf8e6d (patch)
tree9415b2029e39f282f4954844bc3e9d62011159a4
parent61e31d35609f2da168070b50917699e1ecfa2454 (diff)
downloadqpid-python-67e4b64865eec3cbf91a44c422f990b726bf8e6d.tar.gz
QPID-1036 increase timeouts to more reasonable levels, ensure that durable queues are deleted when no longer needed
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.x@654109 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs11
-rw-r--r--dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs6
-rw-r--r--dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs2
3 files changed, 15 insertions, 4 deletions
diff --git a/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs b/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
index 790f92dcde..d4b61a2788 100644
--- a/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
+++ b/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
@@ -55,6 +55,9 @@ namespace Apache.Qpid.Integration.Tests.testcases
/// <summary> Holds an array of channels for building mutiple test end-points. </summary>
protected IChannel[] testChannel = new IChannel[10];
+ /// <summary> Holds an array of queues for building mutiple test end-points. </summary>
+ protected String[] testQueue = new String[10];
+
/// <summary> Holds an array of producers for building mutiple test end-points. </summary>
protected IMessagePublisher[] testProducer = new IMessagePublisher[10];
@@ -144,6 +147,10 @@ namespace Apache.Qpid.Integration.Tests.testcases
if (declareBind)
{
+ if (durable)
+ {
+ testQueue[n] = queueName;
+ }
testChannel[n].DeclareQueue(queueName, durable, true, true);
testChannel[n].Bind(queueName, exchangeName, routingKey);
}
@@ -167,6 +174,10 @@ namespace Apache.Qpid.Integration.Tests.testcases
if (testConsumer[n] != null)
{
+ if (testQueue[n] != null)
+ {
+ testChannel[n].DeleteQueue(testQueue[n], false, false, true);
+ }
testConsumer[n].Close();
testConsumer[n].Dispose();
testConsumer[n] = null;
diff --git a/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs b/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs
index 117dc200d3..e34864aefd 100644
--- a/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs
+++ b/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs
@@ -127,7 +127,7 @@ namespace Apache.Qpid.Integration.Tests.testcases
.WithRoutingKey(_routingKey)
.Create();
_logger.Info("Publisher created...");
- SendTestMessage("Message 1");
+ SendTestMessage("DeleteNonEmptyQueue Message 1");
try
{
@@ -165,8 +165,8 @@ namespace Apache.Qpid.Integration.Tests.testcases
.Create();
_logger.Info("Publisher created...");
- SendTestMessage("Message 1");
- SendTestMessage("Message 2");
+ SendTestMessage("DeleteQueueWithResponse Message 1");
+ SendTestMessage("DeleteQueueWithResponse Message 2");
// delete the queue, the server must respond
_channel.DeleteQueue(_queueName, false, false, false);
diff --git a/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs b/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs
index 1ab8d79250..5e17cf1d2d 100644
--- a/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs
+++ b/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs
@@ -50,7 +50,7 @@ namespace Apache.Qpid.Integration.Tests.testcases
private static ILog _logger = LogManager.GetLogger(typeof(HeadersExchangeTest));
/// <summary> Holds the default test timeout for broker communications before tests give up. </summary>
- private static readonly int TIMEOUT = 1000;
+ private static readonly int TIMEOUT = 2000;
/// <summary> Holds the name of the headers exchange to create to send test messages on. </summary>
private string _exchangeName = "ServiceQ1";