Skip to content

ServiceBus : bug fix and New SDK Nuget version #3858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ResourceManager/ServiceBus/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
-->
## Current Release

* Bug fix : some properties of Queue object were not updated beacuse of the space inserted in there name in swagger spec.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thin k of this form the customer perspective - what would the customer need to know about this - just what the affects of the bug were and that it was fixed, not the root cause.

- e.g. not able to set value for MaxDeliveryCount, lockDuration, entityAvailabilityStatus, duplicateDetectionHistoryTimeWindow, maxDeliveryCount, messageCount,entityAvailabilityStatus and duplicateDetectionHistoryTimeWindow properties of Queue object.

## Version 0.2.0

## Version 0.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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')" />
<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')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
Expand All @@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Azure.Commands.ServiceBus.Test</RootNamespace>
<AssemblyName>Microsoft.Azure.Commands.ServiceBus.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
Expand Down Expand Up @@ -56,18 +56,28 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceBus.0.0.1-preview\lib\net45\Microsoft.Azure.Management.ServiceBus.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.ServiceBus, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ServiceBus.0.2.0-preview\lib\net452\Microsoft.Azure.Management.ServiceBus.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.7.0\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.12\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.6.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
<Private>True</Private>
Expand All @@ -80,10 +90,6 @@
<Reference Include="Microsoft.Azure.Test.Framework">
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6179.26854-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.7-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.28.3.860, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
<Private>True</Private>
Expand All @@ -92,10 +98,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.3.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Moq">
<HintPath>..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,33 @@ function ServiceBusQueueTests

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

$found = 0

if ($createdNamespace.Name -eq $namespaceName)
{
$found = 1
Assert-AreEqual $location.Replace(' ','') $createdNamespace.Location.Replace(' ','')
Assert-AreEqual $location.Replace(' ','') $createdNamespace.Location.Replace(' ','')
# Assert-AreEqual $resourceGroupName.ToLower() $createdNamespace.ResourceGroupName.ToLower()
# Assert-AreEqual "Messaging" $createdNamespace.NamespaceType
break

}


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

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

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

$resultGetQueue.EnableExpress = $TRUE
$resultGetQueue.EnableExpress = $True
$resultGetQueue.DeadLetteringOnMessageExpiration = $True
$resultGetQueue.MaxDeliveryCount = 5
$resultGetQueue.MaxSizeInMegabytes = 1024

$resltSetQueue = Set-AzureRmServiceBusQueue -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -QueueName $resultGetQueue.Name -QueueObj $resultGetQueue
Assert-True {$resltSetQueue.Name -eq $resultGetQueue.Name} "In GetQueue response, QueueName not found"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,31 +111,14 @@ function ServiceBusSubscriptionTests

# Get Created Subscritpiton Name
$resultGetSub = Get-AzureRmServiceBusSubscription -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -TopicName $resultGetTopic.Name -SubscriptionName $subName

#$Subfound = 0

if ($resultGetSub.Name -eq $subName)
{
$Subfound = 1
Assert-True {$location.Replace(' ','') -eq $resultGetSub.Location.Replace(' ','')} "ServiceBus Subcription Get-AzureRmServiceBusSubscription - Location didnt Matched "
break
}

# Assert-True {$Subfound -eq 0} "Subscription created earlier is not found."

Assert-True {$resultGetSub.Name -eq $subName} "Subscription created earlier is not found."

# Update the subscription.
$resultGetSub.IsReadOnly = $True
$resultSetSub = Set-AzureRmServiceBusSubscription -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -TopicName $resultGetTopic.Name -SubscriptionObj $resultGetSub

#$Subfound1 = 0
#if ($resultSetSub.Name -eq $resultGetSub.Name)
# {
# $Subfound1 = 1
# Assert-AreEqual $location $resultSetSub.Location
# Assert-AreEqual $resultGetSub.IsReadOnly $resultSetSub.IsReadOnly
# break
# }
#Assert-True {$Subfound1 -eq 0} "Subscription Updated earlier is not found."

Assert-True {$resultSetSub.Name -eq $resultGetSub.Name} "Subscription Updated earlier is not found."

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading