Пример #1
0
        public async Task CanStopLongRunningCronJob() {
            var job = new LongRunningJob(Log);
            var runner = new JobRunner(job, Log);
            var cts = new CancellationTokenSource(TimeSpan.FromSeconds(1));
            var result = await runner.RunAsync(cts.Token);

            Assert.True(result);
        }