public void JobRunnerCancelJobs()
        {
            var id = new TestSlowJob().Enqueue(jobStore).Id.Value;
            Thread.Sleep(Heartbeat * 2);

            var record = jobStore.GetJob(id);
            Assert.AreEqual(JobStatus.Started, record.Status);

            record.Status = JobStatus.Canceling;
            jobStore.SaveJob(record);
            Thread.Sleep(Heartbeat * 2);

            Assert.AreEqual(JobStatus.Canceled, jobStore.GetJob(id).Status);
        }
        public void JobRunnerDequeueJobs()
        {
            var id = new TestSlowJob().Enqueue(jobStore).Id.Value;
            Thread.Sleep(Heartbeat * 2);

            Assert.AreEqual(JobStatus.Started, jobStore.GetJob(id).Status);
        }