Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Feb 4, 2025
1 parent d5ec19c commit 54e1292
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ResourceNotificationService(
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_serviceProvider = serviceProvider;
_resourceLoggerService = resourceLoggerService ?? throw new ArgumentNullException(nameof(resourceLoggerService));
DefaultWaitBehavior = serviceProvider.GetRequiredService<IOptions<ResourceNotificationServiceOptions>>().Value.DefaultWaitBehavior;
DefaultWaitBehavior = serviceProvider.GetService<IOptions<ResourceNotificationServiceOptions>>()?.Value.DefaultWaitBehavior ?? WaitBehavior.StopOnDependencyFailure;

// The IHostApplicationLifetime parameter is not used anymore, but we keep it for backwards compatibility.
// Notification updates will be cancelled when the service is disposed.
Expand Down

0 comments on commit 54e1292

Please sign in to comment.