WaitForIdleComputeNode() public static method

Waits for a compute node to get to the idle state
public static WaitForIdleComputeNode ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId ) : void
controller BatchController
context BatchAccountContext
poolId string
computeNodeId string
return void
Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        private void TestDisableAndEnableComputeNodeScheduling(bool usePipeline, string testMethodName)
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;

            controller.RunPsTestWorkflow(
                () => { return(new string[] { string.Format("Test-DisableAndEnableComputeNodeScheduling '{0}' '{1}' '{2}' '{3}'", ScenarioTestHelpers.MpiOnlineAccount, poolId, computeNodeId, usePipeline ? 1 : 0) }); },
                () =>
            {
                context       = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, ScenarioTestHelpers.MpiOnlineAccount);
                computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
            },
                null,
                TestUtilities.GetCallingClass(),
                testMethodName);
        }
Ejemplo n.º 4
0
        private void TestReimageComputeNode(bool usePipeline, string testMethodName)
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;

            controller.RunPsTestWorkflow(
                () => { return(new string[] { string.Format("Test-ReimageComputeNode '{0}' '{1}' '{2}'", poolId, computeNodeId, usePipeline ? 1 : 0) }); },
                () =>
            {
                context       = new ScenarioTestContext();
                computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
            },
                null,
                TestUtilities.GetCallingClass(),
                testMethodName);
        }
Ejemplo n.º 5
0
        public void TestDisableAndEnableComputeNodeScheduling()
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;

            controller.RunPsTestWorkflow(
                () => { return(new string[] { string.Format("Test-DisableAndEnableComputeNodeScheduling '{0}' '{1}'", poolId, computeNodeId) }); },
                () =>
            {
                context       = new ScenarioTestContext();
                computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
            },
                null,
                TestUtilities.GetCallingClass(),
                TestUtilities.GetCurrentMethodName());
        }
        private void TestRebootComputeNode(bool usePipeline)
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;

            controller.RunPsTestWorkflow(
                () => { return(new string[] { string.Format("Test-RebootComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }); },
                () =>
            {
                context       = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
                computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
            },
                null,
                TestUtilities.GetCallingClass(),
                usePipeline ? "TestRebootComputeNodePipeline" : "TestRebootComputeNodeById");
        }
Ejemplo n.º 7
0
        public void TestDisableAndEnableComputeNodeScheduling()
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;

            controller.RunPsTestWorkflow(
                _logger,
                () => { return(new string[] { string.Format("Test-DisableAndEnableComputeNodeScheduling '{0}' '{1}'", poolId, computeNodeId) }); },
                () =>
            {
                context       = new ScenarioTestContext();
                computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
            },
                null,
                MethodBase.GetCurrentMethod().ReflectedType?.ToString(),
                MethodBase.GetCurrentMethod().Name);
        }
Ejemplo n.º 8
0
        public void TestRebootAndReimageComputeNode()
        {
            BatchController     controller = BatchController.NewInstance;
            BatchAccountContext context    = null;
            string computeNodeId           = null;
            string computeNodeId2          = null;

            controller.RunPsTestWorkflow(
                () => { return(new string[] { string.Format("Test-RebootAndReimageComputeNode '{0}' '{1}' '{2}'", poolId, computeNodeId, computeNodeId2) }); },
                () =>
            {
                context        = new ScenarioTestContext();
                computeNodeId  = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 0);
                computeNodeId2 = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 1);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
                ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId2);
            },
                null,
                MethodBase.GetCurrentMethod().ReflectedType?.ToString(),
                MethodBase.GetCurrentMethod().Name);
        }