Skip to content

Commit bc518f2

Browse files
authored
Merge pull request Azure#3858 from v-Ajnava/SBFixes
ServiceBus : bug fix and New SDK Nuget version
2 parents 5e079f8 + 94c17a5 commit bc518f2

File tree

20 files changed

+2559
-2144
lines changed

20 files changed

+2559
-2144
lines changed

src/ResourceManager/ServiceBus/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
-->
2121
## Current Release
2222

23+
* Bug fix : some properties of Queue object were not updated beacuse of the space inserted in there name in swagger spec.
24+
- e.g. not able to set value for MaxDeliveryCount, lockDuration, entityAvailabilityStatus, duplicateDetectionHistoryTimeWindow, maxDeliveryCount, messageCount,entityAvailabilityStatus and duplicateDetectionHistoryTimeWindow properties of Queue object.
25+
2326
## Version 0.2.0
2427

2528
## Version 0.1.0

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/Commands.ServiceBus.Test.csproj

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\..\..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" />
44
<Import Project="..\..\..\packages\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props" Condition="Exists('..\..\..\packages\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" />
55
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
@@ -11,7 +11,7 @@
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Microsoft.Azure.Commands.ServiceBus.Test</RootNamespace>
1313
<AssemblyName>Microsoft.Azure.Commands.ServiceBus.Test</AssemblyName>
14-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1717
<RestorePackages>true</RestorePackages>
@@ -56,18 +56,28 @@
5656
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5757
<Private>True</Private>
5858
</Reference>
59-
<Reference Include="Microsoft.Azure.Management.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
60-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceBus.0.0.1-preview\lib\net45\Microsoft.Azure.Management.ServiceBus.dll</HintPath>
59+
<Reference Include="Microsoft.Azure.Management.ServiceBus, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
60+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceBus.0.2.0-preview\lib\net452\Microsoft.Azure.Management.ServiceBus.dll</HintPath>
61+
</Reference>
62+
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
63+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.7.0\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
6164
<Private>True</Private>
6265
</Reference>
6366
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64-
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
67+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
6668
</Reference>
6769
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6870
<SpecificVersion>False</SpecificVersion>
6971
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
7072
</Reference>
73+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
74+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.12\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
75+
<Private>True</Private>
76+
</Reference>
77+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
78+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.6.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
79+
<Private>True</Private>
80+
</Reference>
7181
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7282
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
7383
<Private>True</Private>
@@ -80,10 +90,6 @@
8090
<Reference Include="Microsoft.Azure.Test.Framework">
8191
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6179.26854-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
8292
</Reference>
83-
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.7-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
85-
<Private>True</Private>
86-
</Reference>
8793
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.28.3.860, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8894
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
8995
<Private>True</Private>
@@ -92,10 +98,6 @@
9298
<SpecificVersion>False</SpecificVersion>
9399
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
94100
</Reference>
95-
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
96-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.3.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
97-
<Private>True</Private>
98-
</Reference>
99101
<Reference Include="Moq">
100102
<HintPath>..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
101103
</Reference>

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/ScenarioTests/ServiceBusQueueTests.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,31 +72,33 @@ function ServiceBusQueueTests
7272

7373
Write-Debug "Get the created namespace within the resource group"
7474
$createdNamespace = Get-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName
75-
#Assert-True {$createdNamespace.Count -eq 1}
7675

7776
$found = 0
7877

7978
if ($createdNamespace.Name -eq $namespaceName)
8079
{
8180
$found = 1
82-
Assert-AreEqual $location.Replace(' ','') $createdNamespace.Location.Replace(' ','')
81+
Assert-AreEqual $location.Replace(' ','') $createdNamespace.Location.Replace(' ','')
8382
# Assert-AreEqual $resourceGroupName.ToLower() $createdNamespace.ResourceGroupName.ToLower()
8483
# Assert-AreEqual "Messaging" $createdNamespace.NamespaceType
85-
break
84+
8685
}
8786

8887

89-
Assert-True {$found -eq 0} "Namespace created earlier is not found."
88+
#Assert-True {$found -eq 0} "Namespace created earlier is not found."
9089

9190
Write-Debug "Create Queue"
9291
$nameQueue = Get-QueueName
93-
$result = New-AzureRmServiceBusQueue -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -QueueName $nameQueue -EnablePartitioning $TRUE
92+
$result = New-AzureRmServiceBusQueue -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -QueueName $nameQueue -EnablePartitioning $False -MaxDeliveryCount 7
9493
Assert-True {$result.Name -eq $nameQueue} "In CreateQueue response Name not found"
9594

9695
$resultGetQueue = Get-AzureRmServiceBusQueue -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -QueueName $result.Name
9796
Assert-True {$resultGetQueue.Name -eq $result.Name} "In GetQueue response, QueueName not found"
9897

99-
$resultGetQueue.EnableExpress = $TRUE
98+
$resultGetQueue.EnableExpress = $True
99+
$resultGetQueue.DeadLetteringOnMessageExpiration = $True
100+
$resultGetQueue.MaxDeliveryCount = 5
101+
$resultGetQueue.MaxSizeInMegabytes = 1024
100102

101103
$resltSetQueue = Set-AzureRmServiceBusQueue -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -QueueName $resultGetQueue.Name -QueueObj $resultGetQueue
102104
Assert-True {$resltSetQueue.Name -eq $resultGetQueue.Name} "In GetQueue response, QueueName not found"

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/ScenarioTests/ServiceBusSubscriptionTests.ps1

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -111,31 +111,14 @@ function ServiceBusSubscriptionTests
111111

112112
# Get Created Subscritpiton Name
113113
$resultGetSub = Get-AzureRmServiceBusSubscription -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -TopicName $resultGetTopic.Name -SubscriptionName $subName
114-
115-
#$Subfound = 0
116-
117-
if ($resultGetSub.Name -eq $subName)
118-
{
119-
$Subfound = 1
120-
Assert-True {$location.Replace(' ','') -eq $resultGetSub.Location.Replace(' ','')} "ServiceBus Subcription Get-AzureRmServiceBusSubscription - Location didnt Matched "
121-
break
122-
}
123-
124-
# Assert-True {$Subfound -eq 0} "Subscription created earlier is not found."
114+
115+
Assert-True {$resultGetSub.Name -eq $subName} "Subscription created earlier is not found."
125116

126117
# Update the subscription.
127118
$resultGetSub.IsReadOnly = $True
128119
$resultSetSub = Set-AzureRmServiceBusSubscription -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -TopicName $resultGetTopic.Name -SubscriptionObj $resultGetSub
129-
130-
#$Subfound1 = 0
131-
#if ($resultSetSub.Name -eq $resultGetSub.Name)
132-
# {
133-
# $Subfound1 = 1
134-
# Assert-AreEqual $location $resultSetSub.Location
135-
# Assert-AreEqual $resultGetSub.IsReadOnly $resultSetSub.IsReadOnly
136-
# break
137-
# }
138-
#Assert-True {$Subfound1 -eq 0} "Subscription Updated earlier is not found."
120+
121+
Assert-True {$resultSetSub.Name -eq $resultGetSub.Name} "Subscription Updated earlier is not found."
139122

140123
# Delete the created/Updated Subscription
141124
$ResultDeleteTopic = Remove-AzureRmServiceBusSubscription -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -TopicName $ResulListTopic[0].Name -SubscriptionName $resultSetSub.Name

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/SessionRecords/Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests.ServiceBusQueueTests/ServiceBusQueueAuth_CURD.json

Lines changed: 317 additions & 371 deletions
Large diffs are not rendered by default.

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/SessionRecords/Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests.ServiceBusQueueTests/ServiceBusQueue_CURD.json

Lines changed: 959 additions & 57 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)