Skip to content

Commit 4cc95fd

Browse files
general clean up and slns updated to vs2015
1 parent cadd870 commit 4cc95fd

File tree

9 files changed

+153
-147
lines changed

9 files changed

+153
-147
lines changed

src/ResourceManager/AzureBatch/AzureBatch.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.40629.0
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.25123.0
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}"
66
EndProject

src/ResourceManager/AzureBatch/BatchModelGenerator/BatchModelGenerator.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.40629.0
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.25123.0
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BatchModelGenerator", "BatchModelGenerator.csproj", "{374701E4-539A-459A-9A00-B04E51652997}"
66
EndProject

src/ResourceManager/AzureBatch/BatchModelGenerator/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public class Program
3131

3232
private static readonly Dictionary<string, string> OMtoPSClassMappings = new Dictionary<string, string>()
3333
{
34-
{"Microsoft.Azure.Batch.NodeAgentSku", "PSNodeAgentSku"},
35-
{"Microsoft.Azure.Batch.ImageReference", "PSImageReference"},
34+
{"Microsoft.Azure.Batch.AffinityInformation", "PSAffinityInformation"},
3635
{"Microsoft.Azure.Batch.AutoPoolSpecification", "PSAutoPoolSpecification"},
3736
{"Microsoft.Azure.Batch.AutoScaleRun", "PSAutoScaleRun"},
3837
{"Microsoft.Azure.Batch.AutoScaleRunError", "PSAutoScaleRunError"},
@@ -55,6 +54,7 @@ public class Program
5554
{"Microsoft.Azure.Batch.ExitCodeMapping", "PSExitCodeMapping"},
5655
{"Microsoft.Azure.Batch.ExitOptions", "PSExitOptions"},
5756
{"Microsoft.Azure.Batch.FileProperties", "PSFileProperties"},
57+
{"Microsoft.Azure.Batch.ImageReference", "PSImageReference"},
5858
{"Microsoft.Azure.Batch.RemoteLoginSettings", "PSRemoteLoginSettings"},
5959
{"Microsoft.Azure.Batch.JobConstraints", "PSJobConstraints"},
6060
{"Microsoft.Azure.Batch.JobExecutionInformation", "PSJobExecutionInformation"},
@@ -72,8 +72,9 @@ public class Program
7272
{"Microsoft.Azure.Batch.MetadataItem", "PSMetadataItem"},
7373
{"Microsoft.Azure.Batch.MultiInstanceSettings", "PSMultiInstanceSettings"},
7474
{"Microsoft.Azure.Batch.NameValuePair", "PSNameValuePair"},
75-
{"Microsoft.Azure.Batch.NodeFile", "PSNodeFile"},
7675
{"Microsoft.Azure.Batch.NetworkConfiguration", "PSNetworkConfiguration"},
76+
{"Microsoft.Azure.Batch.NodeAgentSku", "PSNodeAgentSku"},
77+
{"Microsoft.Azure.Batch.NodeFile", "PSNodeFile"},
7778
{"Microsoft.Azure.Batch.PoolInformation", "PSPoolInformation"},
7879
{"Microsoft.Azure.Batch.PoolSpecification", "PSPoolSpecification"},
7980
{"Microsoft.Azure.Batch.PoolStatistics", "PSPoolStatistics"},
@@ -95,7 +96,6 @@ public class Program
9596
{"Microsoft.Azure.Batch.TaskSchedulingPolicy", "PSTaskSchedulingPolicy"},
9697
{"Microsoft.Azure.Batch.TaskStatistics", "PSTaskStatistics"},
9798
{"Microsoft.Azure.Batch.UsageStatistics", "PSUsageStatistics"},
98-
{"Microsoft.Azure.Batch.AffinityInformation", "PSAffinityInformation"},
9999
{"Microsoft.Azure.Batch.VirtualMachineConfiguration", "PSVirtualMachineConfiguration"},
100100
{"Microsoft.Azure.Batch.WindowsConfiguration", "PSWindowsConfiguration"},
101101
};

src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using System.Management.Automation;
2424
using Xunit;
2525
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
26+
using CloudJob = Microsoft.Azure.Batch.Protocol.Models.CloudJob;
2627
using OnAllTasksComplete = Microsoft.Azure.Batch.Common.OnAllTasksComplete;
2728

2829
namespace Microsoft.Azure.Commands.Batch.Test.Jobs
@@ -55,38 +56,27 @@ public void AutoCompletionSettingIsSentToService()
5556

5657
Assert.Throws<ArgumentNullException>(() => cmdlet.ExecuteCmdlet());
5758

58-
<<<<<<< HEAD
5959
CloudJob cloudJob = new Azure.Batch.Protocol.Models.CloudJob(
6060
id: "job-id",
6161
poolInfo: new Azure.Batch.Protocol.Models.PoolInformation(),
6262
onAllTasksComplete: (Azure.Batch.Protocol.Models.OnAllTasksComplete?)OnAllTasksComplete.TerminateJob);
6363

6464
cmdlet.Job = new PSCloudJob(BatchTestHelpers.CreateFakeBoundJob(context, cloudJob));
6565
cmdlet.Job.OnAllTasksComplete = OnAllTasksComplete.TerminateJob;
66-
=======
67-
var cloudJob = new Azure.Batch.Protocol.Models.CloudJob(
68-
id: "job-id",
69-
poolInfo: new Azure.Batch.Protocol.Models.PoolInformation(),
70-
onAllTasksComplete: OnAllTasksComplete.TerminateJob);
71-
72-
cmdlet.Job = new PSCloudJob(BatchTestHelpers.CreateFakeBoundJob(context, cloudJob));
73-
>>>>>>> hotfix/batch-tests-fixup
7466

7567
RequestInterceptor interceptor =
7668
BatchTestHelpers.CreateFakeServiceResponseInterceptor<JobUpdateParameter, JobUpdateOptions, AzureOperationHeaderResponse<JobUpdateHeaders>>(
7769
new AzureOperationHeaderResponse<JobUpdateHeaders>(),
7870
request =>
79-
{
80-
<<<<<<< HEAD
81-
Assert.Equal((OnAllTasksComplete)request.Parameters.OnAllTasksComplete, OnAllTasksComplete.TerminateJob);
82-
=======
83-
Assert.Equal(request.Parameters.OnAllTasksComplete, OnAllTasksComplete.TerminateJob);
84-
>>>>>>> hotfix/batch-tests-fixup
85-
});
71+
{
72+
Assert.Equal((OnAllTasksComplete)request.Parameters.OnAllTasksComplete, OnAllTasksComplete.TerminateJob);
73+
});
8674

8775
cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor };
8876

8977
// Verify that no exceptions occur
9078
cmdlet.ExecuteCmdlet();
79+
}
9180
}
9281
}
82+

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ public static string WaitForOSVersionChange(BatchController controller, BatchAcc
266266
PoolId = poolId
267267
};
268268

269-
DateTime timeout = DateTime.Now.AddMinutes(20);
269+
DateTime timeout = DateTime.Now.AddMinutes(5);
270270
PSCloudPool pool = client.ListPools(options).First();
271271
while (pool.CloudServiceConfiguration.CurrentOSVersion != pool.CloudServiceConfiguration.TargetOSVersion)
272272
{
273273
if (DateTime.Now > timeout)
274274
{
275275
throw new TimeoutException("Timed out waiting for active state pool");
276276
}
277-
Sleep(15000);
277+
Sleep(5000);
278278
pool = client.ListPools(options).First();
279279
}
280280

@@ -302,15 +302,15 @@ public static void WaitForSteadyPoolAllocation(BatchController controller, Batch
302302
PoolId = poolId
303303
};
304304

305-
DateTime timeout = DateTime.Now.AddMinutes(15);
305+
DateTime timeout = DateTime.Now.AddMinutes(5);
306306
PSCloudPool pool = client.ListPools(options).First();
307307
while (pool.AllocationState != AllocationState.Steady)
308308
{
309309
if (DateTime.Now > timeout)
310310
{
311311
throw new TimeoutException("Timed out waiting for steady allocation state");
312312
}
313-
Sleep(10000);
313+
Sleep(5000);
314314
pool = client.ListPools(options).First();
315315
}
316316
}

0 commit comments

Comments
 (0)