File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -466,14 +466,14 @@ public async Task AddingJobsAndDuringStartupAndRuntimeNotInOnlyOneCallOnlyOneExe
466
466
[ Fact ]
467
467
public async Task CallingAddNCronJobMultipleTimesWillRegisterAllJobs ( )
468
468
{
469
- ServiceCollection . AddNCronJob ( n => n . AddJob < ShortRunningJob > ( ) ) ;
469
+ ServiceCollection . AddNCronJob ( n => n . AddJob < ShortRunningJob > ( p => p . WithCronExpression ( "* * * * *" ) ) ) ;
470
470
ServiceCollection . AddNCronJob ( n => n . AddJob < SimpleJob > ( p => p . WithCronExpression ( "* * * * *" ) ) ) ;
471
471
var provider = CreateServiceProvider ( ) ;
472
472
473
473
await provider . GetRequiredService < IHostedService > ( ) . StartAsync ( CancellationToken ) ;
474
474
475
475
FakeTimer . Advance ( TimeSpan . FromMinutes ( 1 ) ) ;
476
- var jobFinished = await WaitForJobsOrTimeout ( 1 ) ;
476
+ var jobFinished = await WaitForJobsOrTimeout ( 2 ) ;
477
477
jobFinished . ShouldBeTrue ( ) ;
478
478
}
479
479
You can’t perform that action at this time.
0 commit comments