public static GetPoolCurrentDedicated ( BatchController controller, BatchAccountContext context, string poolId ) : int | ||
controller | BatchController | |
context | BatchAccountContext | |
poolId | string | |
Résultat | int |
private void TestRemoveComputeNode(bool usePipeline, string testMethodName) { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; int originalDedicated = 3; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-RemoveComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); originalDedicated = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); }, () => { ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); ScenarioTestHelpers.ResizePool(controller, context, poolId, originalDedicated); }, TestUtilities.GetCallingClass(), testMethodName); }
public void TestRemoveMultipleComputeNodes() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string computeNodeId2 = null; int originalDedicated = 3; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-RemoveMultipleComputeNodes '{0}' '{1}' '{2}'", poolId, computeNodeId, computeNodeId2) }); }, () => { context = new ScenarioTestContext(); originalDedicated = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); ScenarioTestHelpers.ResizePool(controller, context, poolId, originalDedicated + 2); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); computeNodeId2 = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 1); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId2); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestListAllComputeNodes() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; int computeNodeCount = 0; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListAllComputeNodes '{0}' '{1}' '{2}'", accountName, poolId, computeNodeCount) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeCount = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestListComputeNodesByFilter() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string state = "idle"; int matches = 0; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListComputeNodesByFilter '{0}' '{1}' '{2}'", poolId, state, matches) }); }, () => { context = new ScenarioTestContext(); matches = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }