Skip to content

Commit

Permalink
[Service Bus Client] Skip Failing Tests from Track 1 (#16553)
Browse files Browse the repository at this point in the history
The focus of these changes is to mark a set of tests that have recently
begun failing in nightly runs to be ignored until they can be investigated
and fixed.
  • Loading branch information
jsquire authored Nov 3, 2020
1 parent 0bf86dd commit 0b95f21
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Microsoft.Azure.ServiceBus.UnitTests.Management
using Xunit;

public class ManagementClientTests
{
[Fact]
{
[Fact(Skip = "Test failing in nightly runs. Tracked by #16552")]
[LiveTest]
[DisplayTestMethodName]
public async Task BasicQueueCrudTest()
Expand Down Expand Up @@ -98,7 +98,7 @@ public async Task BasicTopicCrudTest()
{
var topicName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));

try
{
var td = new TopicDescription(topicName)
Expand Down Expand Up @@ -315,7 +315,7 @@ await Assert.ThrowsAsync<MessagingEntityNotFoundException>(
public async Task GetQueueRuntimeInfoTest()
{
var queueName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var qClient = new QueueClient(TestUtility.NamespaceConnectionString, queueName);

try
Expand All @@ -329,7 +329,7 @@ public async Task GetQueueRuntimeInfoTest()

// Populating 1 active message, 1 dead letter message and 1 scheduled message
// Changing Last Accessed Time

await qClient.SendAsync(new Message() { MessageId = "1" });
await qClient.SendAsync(new Message() { MessageId = "2" });
await qClient.SendAsync(new Message() { MessageId = "3", ScheduledEnqueueTimeUtc = DateTime.UtcNow.AddDays(1) });
Expand Down Expand Up @@ -384,7 +384,7 @@ public async Task GetSubscriptionRuntimeInfoTest()
{
var topicName = Guid.NewGuid().ToString("D").Substring(0, 8);
var subscriptionName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var sender = new MessageSender(TestUtility.NamespaceConnectionString, topicName);
var receiver = new MessageReceiver(TestUtility.NamespaceConnectionString, EntityNameHelper.FormatSubscriptionPath(topicName, subscriptionName));

Expand All @@ -395,7 +395,7 @@ public async Task GetSubscriptionRuntimeInfoTest()
// Changing Last Updated Time
td.AutoDeleteOnIdle = TimeSpan.FromMinutes(100);
await client.UpdateTopicAsync(td);

var sd = await client.CreateSubscriptionAsync(topicName, subscriptionName);

// Changing Last Updated Time for subscription
Expand All @@ -404,7 +404,7 @@ public async Task GetSubscriptionRuntimeInfoTest()

// Populating 1 active message, 1 dead letter message and 1 scheduled message
// Changing Last Accessed Time

await sender.SendAsync(new Message() { MessageId = "1" });
await sender.SendAsync(new Message() { MessageId = "2" });
await sender.SendAsync(new Message() { MessageId = "3", ScheduledEnqueueTimeUtc = DateTime.UtcNow.AddDays(1) });
Expand All @@ -426,7 +426,7 @@ public async Task GetSubscriptionRuntimeInfoTest()
Assert.Equal(2, subscriptionRI.MessageCount);

var singleSubscriptionRI = await client.GetSubscriptionRuntimeInfoAsync(topicName, subscriptionName);

Assert.Equal(subscriptionRI.CreatedAt, singleSubscriptionRI.CreatedAt);
Assert.Equal(subscriptionRI.AccessedAt, singleSubscriptionRI.AccessedAt);
Assert.Equal(subscriptionRI.UpdatedAt, singleSubscriptionRI.UpdatedAt);
Expand All @@ -436,9 +436,9 @@ public async Task GetSubscriptionRuntimeInfoTest()
Assert.Equal(subscriptionRI.MessageCountDetails.DeadLetterMessageCount, singleSubscriptionRI.MessageCountDetails.DeadLetterMessageCount);
Assert.Equal(subscriptionRI.MessageCountDetails.ScheduledMessageCount, singleSubscriptionRI.MessageCountDetails.ScheduledMessageCount);
Assert.Equal(subscriptionRI.TopicPath, singleSubscriptionRI.TopicPath);

await client.DeleteSubscriptionAsync(topicName, subscriptionName);
await client.DeleteTopicAsync(topicName);
await client.DeleteTopicAsync(topicName);
}
catch
{
Expand All @@ -459,7 +459,7 @@ public async Task GetTopicRuntimeInfoTest()
{
var topicName = Guid.NewGuid().ToString("D").Substring(0, 8);
var subscriptionName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var sender = new MessageSender(TestUtility.NamespaceConnectionString, topicName);

try
Expand All @@ -474,14 +474,14 @@ public async Task GetTopicRuntimeInfoTest()

// Populating 1 active message and 1 scheduled message
// Changing Last Accessed Time

await sender.SendAsync(new Message() { MessageId = "1" });
await sender.SendAsync(new Message() { MessageId = "2" });
await sender.SendAsync(new Message() { MessageId = "3", ScheduledEnqueueTimeUtc = DateTime.UtcNow.AddDays(1) });

var topicsRI = await client.GetTopicsRuntimeInfoAsync();
var topicRI = topicsRI.FirstOrDefault(t => topicName.Equals(t.Path, StringComparison.OrdinalIgnoreCase));

Assert.Equal(topicName, topicRI.Path);

Assert.True(topicRI.CreatedAt < topicRI.UpdatedAt);
Expand All @@ -505,7 +505,7 @@ public async Task GetTopicRuntimeInfoTest()
Assert.Equal(topicRI.SubscriptionCount, singleTopicRI.SubscriptionCount);

await client.DeleteSubscriptionAsync(topicName, subscriptionName);
await client.DeleteTopicAsync(topicName);
await client.DeleteTopicAsync(topicName);
}
catch
{
Expand Down Expand Up @@ -673,7 +673,7 @@ await Assert.ThrowsAsync<MessagingEntityAlreadyExistsException>(
};

[Theory]
[MemberData(nameof(TestData_EntityNameValidationTest))]
[MemberData(nameof(TestData_EntityNameValidationTest))]
[LiveTest]
[DisplayTestMethodName]
public void EntityNameValidationTest(string entityName, bool isPathSeparatorAllowed)
Expand All @@ -697,11 +697,11 @@ public void EntityNameValidationTest(string entityName, bool isPathSeparatorAllo
[DisplayTestMethodName]
public async Task ForwardingEntitySetupTest()
{
// queueName --Fwd to--> destinationName --fwd dlq to--> dqlDestinationName
// queueName --Fwd to--> destinationName --fwd dlq to--> dqlDestinationName
var queueName = Guid.NewGuid().ToString("D").Substring(0, 8);
var destinationName = Guid.NewGuid().ToString("D").Substring(0, 8);
var dlqDestinationName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var sender = new MessageSender(TestUtility.NamespaceConnectionString, queueName);

try
Expand All @@ -719,7 +719,7 @@ public async Task ForwardingEntitySetupTest()
};
var baseQ = await client.CreateQueueAsync(qd);


await sender.SendAsync(new Message() { MessageId = "mid" });
await sender.CloseAsync();

Expand Down Expand Up @@ -752,7 +752,7 @@ public async Task ForwardingEntitySetupTest()
}
}

[Fact]
[Fact(Skip = "Test failing in nightly runs. Tracked by #16552")]
[LiveTest]
[DisplayTestMethodName]
public void AuthRulesEqualityCheckTest()
Expand All @@ -770,7 +770,7 @@ public void AuthRulesEqualityCheckTest()
Assert.Equal(qd, qd2);
}

[Fact]
[Fact(Skip = "Test failing in nightly runs. Tracked by #16552")]
[LiveTest]
[DisplayTestMethodName]
public async Task QueueDescriptionParsedFromResponseEqualityCheckTest()
Expand Down Expand Up @@ -883,7 +883,7 @@ public async Task CorrelationFilterPropertiesTest()
{
var topicName = Guid.NewGuid().ToString("D").Substring(0, 8);
var subscriptionName = Guid.NewGuid().ToString("D").Substring(0, 8);
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));
var client = new ManagementClient(new ServiceBusConnectionStringBuilder(TestUtility.NamespaceConnectionString));

try
{
Expand Down Expand Up @@ -940,7 +940,7 @@ private async Task SafeDeleteQueue(ManagementClient client, string name, [Caller
await (client?.DeleteQueueAsync(name) ?? Task.CompletedTask);
}
catch (Exception ex)
{
{
TestUtility.Log($"{ caller } could not delete the queue [{ name }]. Error: [{ ex.Message }]");
}
}
Expand Down

0 comments on commit 0b95f21

Please sign in to comment.