diff --git a/src/SchematicHQ.Client.Test/OpenFeature/SchematicProviderOfflineTests.cs b/src/SchematicHQ.Client.Test/OpenFeature/SchematicProviderOfflineTests.cs index c4f01867..de2a5b8a 100644 --- a/src/SchematicHQ.Client.Test/OpenFeature/SchematicProviderOfflineTests.cs +++ b/src/SchematicHQ.Client.Test/OpenFeature/SchematicProviderOfflineTests.cs @@ -315,6 +315,10 @@ public async Task Initialize_WithNoCustomLogger_StillLogsViaDefaultConsoleLogger // Act await provider.InitializeAsync(EvaluationContext.Empty); + // The default SimpleConsole logger writes on a background thread; dispose + // the factory to synchronously drain the queue before asserting. + options.LoggerFactory.Dispose(); + // Assert Assert.That(stringWriter.ToString(), Does.Contain("Schematic provider initialized")); }