Skip to content

Commit efd6dd0

Browse files
Remove some unused code and fix flaky test (Azure#18933)
1 parent 02baeea commit efd6dd0

File tree

5 files changed

+3
-864
lines changed

5 files changed

+3
-864
lines changed

sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -647,24 +647,6 @@ public virtual ServiceBusSessionProcessor CreateSessionProcessor(
647647
options: options ?? new ServiceBusSessionProcessorOptions());
648648
}
649649

650-
/// <summary>
651-
/// The <see cref="ServiceBusRuleManager"/> is used to manage the rules for a subscription.
652-
/// </summary>
653-
///
654-
/// <param name="topicName">The topic to create a <see cref="ServiceBusRuleManager"/> for.</param>
655-
/// <param name="subscriptionName">The subscription specific to the specified topic to create
656-
/// a <see cref="ServiceBusRuleManager"/> for.</param>
657-
///
658-
/// <returns>A <see cref="ServiceBusRuleManager"/> scoped to the specified subscription and topic.</returns>
659-
internal ServiceBusRuleManager CreateRuleManager(string topicName, string subscriptionName)
660-
{
661-
ValidateEntityName(topicName);
662-
663-
return new ServiceBusRuleManager(
664-
connection: Connection,
665-
subscriptionPath: EntityNameFormatter.FormatSubscriptionPath(topicName, subscriptionName));
666-
}
667-
668650
/// <summary>
669651
/// Validates that the specified entity name matches the entity path in the Connection,
670652
/// if an entity path is specified in the connection.

sdk/servicebus/Azure.Messaging.ServiceBus/src/RuleManager/ServiceBusRuleManager.cs

Lines changed: 0 additions & 256 deletions
This file was deleted.

sdk/servicebus/Azure.Messaging.ServiceBus/tests/RuleManager/RuleTests.cs renamed to sdk/servicebus/Azure.Messaging.ServiceBus/tests/Administration/RuleTests.cs

File renamed without changes.

sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,9 @@ async Task ProcessMessage(ProcessSessionMessageEventArgs args)
12021202
{
12031203
var message = args.Message;
12041204
sessions.TryRemove(message.SessionId, out bool _);
1205-
await Task.Delay(lockDuration.Add(TimeSpan.FromSeconds(10)));
1205+
// wait 3x lockduration since to avoid the case where
1206+
// lock is renewed at the very end of the lock duration delay
1207+
await Task.Delay(lockDuration.Add(lockDuration).Add(lockDuration));
12061208
await args.CompleteMessageAsync(message);
12071209

12081210
Assert.IsTrue(sessionId.Contains(message.SessionId));

0 commit comments

Comments
 (0)