public void Process_AllDataSet_Success()
        {
            StubHttp.Stub(x => x.Post("/endpoint"))
            .WithStatus(HttpStatusCode.OK);

            var step = new HttpPushOutgoingQueueStep
            {
                Category  = "test_category",
                FailCount = 0,
                Payload   = "test_message"
            };

            Processor.Initialize(JobData, NebulaContext);
            var result = Processor.Process(new List <HttpPushOutgoingQueueStep> {
                step
            }).GetAwaiter().GetResult();

            Assert.Equal(0, result.ItemsFailed);
            Assert.Equal(0, result.ItemsRequeued);
        }
Example #2
0
        public int StartJob(string location, string args)
        {
            var id = 0;

            buffer.Run(all =>
            {
                if (all.Count < jobProcessor.GetLimit())
                {
                    var job = jobProvider.GetJob(location, args,
                                                 Clients.Caller);
                    id = jobProcessor.Process(job, all);
                }
            });
            return(id);
        }