diff --git a/sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py b/sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py index 7c69a9a3a654..a822c0e691a8 100644 --- a/sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py +++ b/sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py @@ -141,7 +141,7 @@ def __init__(self, arguments) -> None: arguments.uamqp_transport ) self.topic_name=self.get_from_env('AZURE_SERVICEBUS_TOPIC_NAME') - self.subscription_name=self.get_from_env('AZURE_SERVICE_BUS_SUBSCRIPTION_NAME') + self.subscription_name=self.get_from_env('AZURE_SERVICEBUS_SUBSCRIPTION_NAME') self.receiver=self.servicebus_client.get_subscription_receiver(topic_name=self.topic_name, subscription_name=self.subscription_name) self.async_receiver=self.async_servicebus_client.get_subscription_receiver(topic_name=self.topic_name, subscription_name=self.subscription_name) @@ -194,7 +194,7 @@ def __init__(self, arguments) -> None: ) self.topic_name=self.get_from_env('AZURE_SERVICEBUS_TOPIC_NAME') - self.subscription_name=self.get_from_env('AZURE_SERVICE_BUS_SUBSCRIPTION_NAME') + self.subscription_name=self.get_from_env('AZURE_SERVICEBUS_SUBSCRIPTION_NAME') self.receiver=self.servicebus_client.get_subscription_receiver(topic_name=self.topic_name, subscription_name=self.subscription_name) self.async_receiver=self.async_servicebus_client.get_subscription_receiver(topic_name=self.topic_name, subscription_name=self.subscription_name) diff --git a/sdk/servicebus/perf-resources.bicep b/sdk/servicebus/perf-resources.bicep index f8033a05b022..e17e1daef2ab 100644 --- a/sdk/servicebus/perf-resources.bicep +++ b/sdk/servicebus/perf-resources.bicep @@ -2,11 +2,10 @@ param baseName string = resourceGroup().name param location string = resourceGroup().location var serviceBusNamespaceName = 'sb-${baseName}' -var serviceBusQueueName = 'sb-${baseName}-queue' -var serviceBusTopicName = 'sb-${baseName}-topic' -var serviceBusSubscriptionName = 'sb-${baseName}-subscription' +var serviceBusQueueName = '${serviceBusNamespaceName}-queue' +var serviceBusTopicName = '${serviceBusNamespaceName}-topic' +var serviceBusSubscriptionName = '${serviceBusNamespaceName}-subscription' var defaultSASKeyName = 'RootManageSharedAccessKey' -var authRuleResourceId = resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', serviceBusNamespaceName, defaultSASKeyName) var sbVersion = '2017-04-01' @@ -21,7 +20,8 @@ resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2017-04-01' = { } resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2017-04-01' = { - name: '${serviceBusNamespaceName}/${serviceBusQueueName}' + parent: serviceBusNamespace + name: serviceBusQueueName properties: { lockDuration: 'PT5M' maxSizeInMegabytes: 4096 @@ -35,13 +35,11 @@ resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2017-04-01' = { enablePartitioning: false enableExpress: false } - dependsOn: [ - serviceBusNamespace - ] } resource serviceBusTopic 'Microsoft.ServiceBus/namespaces/topics@2017-04-01' = { - name: '${serviceBusNamespaceName}/${serviceBusTopicName}' + parent: serviceBusNamespace + name: serviceBusTopicName properties: { autoDeleteOnIdle: 'P10675199DT2H48M5.4775807S' defaultMessageTimeToLive: 'P10675199DT2H48M5.4775807S' @@ -54,21 +52,17 @@ resource serviceBusTopic 'Microsoft.ServiceBus/namespaces/topics@2017-04-01' = { status: 'Active' supportOrdering: true } - dependsOn: [ - serviceBusNamespace - ] } -resource serviceBusNamespace_serviceBusTopicName_serviceBusSubscriptionName 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2017-04-01' = { - name: '${serviceBusNamespaceName}/${serviceBusTopicName}/${serviceBusSubscriptionName}' +resource serviceBusSubscription 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2017-04-01' = { + parent: serviceBusTopic + name: serviceBusSubscriptionName properties: { } - dependsOn: [ - serviceBusTopic - ] } - +var authRuleResourceId = resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', serviceBusNamespace.name, defaultSASKeyName) output AZURE_SERVICEBUS_CONNECTION_STRING string = listkeys(authRuleResourceId, sbVersion).primaryConnectionString output AZURE_SERVICEBUS_QUEUE_NAME string = serviceBusQueue.name -output AZURE_TOPIC_QUEUE_NAME string = serviceBusTopic.name +output AZURE_SERVICEBUS_TOPIC_NAME string = serviceBusTopic.name +output AZURE_SERVICEBUS_SUBSCRIPTION_NAME string = serviceBusSubscription.name diff --git a/sdk/servicebus/perf.yml b/sdk/servicebus/perf.yml index 53395794d37a..e02887e68ca9 100644 --- a/sdk/servicebus/perf.yml +++ b/sdk/servicebus/perf.yml @@ -14,7 +14,7 @@ parameters: - name: Arguments displayName: Arguments (regex of arguments to run) type: string - default: '(1024)' + default: '.*' - name: Iterations displayName: Iterations (times to run each test) type: number