public void Verify_Default_Top() { this.Initialize(); var getjobs_options = new ListJobOptions(); var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); Assert.IsTrue(jobs.Count > 2); }
public void Verify_Paging_300() { this.Initialize(); var getjobs_options = new ListJobOptions(); getjobs_options.Top = JobCommands.ADLJobPageSize; var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); Assert.AreEqual(JobCommands.ADLJobPageSize, jobs.Count); }
public void Verify_Paging_1() { this.Initialize(); var getjobs_options = new ListJobOptions(); getjobs_options.Top = 100; var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); Assert.AreEqual(100, jobs.Count); }
public override void ExecuteCmdlet() { ListJobOptions options = new ListJobOptions(this.BatchContext, this.WorkItemName, this.WorkItem, this.AdditionalBehaviors) { JobName = this.Name, Filter = this.Filter, MaxCount = this.MaxCount }; // The enumerator will internally query the service in chunks. Using WriteObject with the enumerate flag will enumerate // the entire collection first and then write the items out one by one in a single group. Using foreach, we can take // advantage of the enumerator's behavior and write output to the pipeline in bursts. foreach (PSCloudJob job in BatchClient.ListJobs(options)) { WriteObject(job); } }
public void List_Jobs_Running() { this.Initialize(); var getjobs_options = new ListJobOptions(); getjobs_options.Top = 30; getjobs_options.Filter.State.IsOneOf(JobState.Running); var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); if (jobs.Count > 0) { foreach (var job in jobs) { Assert.AreEqual(JobState.Running, job.State); } } }
public void List_Jobs() { this.Initialize(); var jobfields = new JobFields(); var getjobs_options = new ListJobOptions(); getjobs_options.Top = 30; getjobs_options.Sorting.Field = jobfields.DegreeOfParallelism; getjobs_options.Sorting.Direction = AdlClient.OData.Enums.OrderByDirection.Descending; var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); foreach (var job in jobs) { System.Console.WriteLine("submitter{0} dop {1}", job.Submitter, job.DegreeOfParallelism); } }
public void List_Jobs_Ended_Failed() { this.Initialize(); var getjobs_options = new ListJobOptions(); getjobs_options.Top = 30; getjobs_options.Filter.State.IsOneOf(JobState.Ended); getjobs_options.Filter.Result.IsOneOf(JobResult.Failed); var jobs = this.AnalyticsClient.Jobs.ListJobs(getjobs_options).ToList(); if (jobs.Count > 0) { foreach (var job in jobs) { Assert.AreEqual(JobState.Ended, job.State); Assert.AreEqual(JobResult.Failed, job.Result); } } }
protected override void ProcessRecord() { ListJobOptions options = new ListJobOptions(this.BatchContext, this.AdditionalBehaviors) { JobId = this.Id, JobScheduleId = this.JobScheduleId, JobSchedule = this.JobSchedule, Filter = this.Filter, Select = this.Select, Expand = this.Expand, MaxCount = this.MaxCount }; // The enumerator will internally query the service in chunks. Using WriteObject with the enumerate flag will enumerate // the entire collection first and then write the items out one by one in a single group. Using foreach, we can take // advantage of the enumerator's behavior and write output to the pipeline in bursts. foreach (PSCloudJob job in BatchClient.ListJobs(options)) { WriteObject(job); } }