From da403df4ac6d2c93baaf44b1b9e0fae3b6807815 Mon Sep 17 00:00:00 2001 From: huangpf Date: Fri, 28 Nov 2014 18:28:46 -0800 Subject: [PATCH 1/2] fix test --- .../FunctionalTests/ScenarioTest.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs index a3f0998cc7c5..f1ba137d59dd 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs @@ -225,8 +225,15 @@ public void ProvisionLinuxVM() try { - vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, newAzureLinuxVMName, serviceName, linuxImageName, "user", - password, locationName); + Utilities.RetryActionUntilSuccess(() => + { + if (vmPowershellCmdlets.TestAzureServiceName(serviceName)) + { + var op = vmPowershellCmdlets.RemoveAzureService(serviceName); + } + + vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, newAzureLinuxVMName, serviceName, linuxImageName, "user", password, locationName); + }, "Windows Azure is currently performing an operation on this hosted service that requires exclusive access.", 10, 30); // Verify PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, serviceName); From 1f5321287d209c031ac6812ccc5e28ccde8eaa1d Mon Sep 17 00:00:00 2001 From: huangpf Date: Mon, 1 Dec 2014 11:50:00 -0800 Subject: [PATCH 2/2] fix role configuration deserialization --- .../Commands.ServiceManagement/Model/DeploymentInfoContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs index c60093f3ac7d..3c051acbf4dc 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs @@ -255,7 +255,7 @@ public DeploymentInfoContext(DeploymentGetResponse deployment) this.RolesConfiguration = new Dictionary(); - var roles = doc.Root.Descendants(this.ns + "Role"); + var roles = doc.Root.Descendants(this.ns + "Role").Where(t => t.Parent == doc.Root); foreach (var role in roles) {