Example #1
0
 public void AssignJobToWorkerNodes()
 {
     ManagerLogger.Info("Going to assign job to the nodes in timer");
     _checkAndAssignJob.Enabled = false;
     _jobRepository.AssignJobToWorkerNode();
     _checkAndAssignJob.Enabled = true;
 }
Example #2
0
        public void ShouldBeAbleToCancelJobOnNode()
        {
            var jobQueueItem = new JobQueueItem
            {
                JobId      = Guid.NewGuid(),
                Name       = "Name Test",
                CreatedBy  = "Created By Test",
                Serialized = "Serialized Test",
                Type       = "Type Test"
            };

            NodeRepository.AddWorkerNode(_workerNode);

            JobRepository.AddItemToJobQueue(jobQueueItem);

            JobRepository.AssignJobToWorkerNode();

            HttpSender.CallToWorkerNodes.Clear();
            ManagerController.CancelJobByJobId(jobQueueItem.JobId);

            HttpSender.CallToWorkerNodes.Count.Should().Be.EqualTo(1);
        }