diff --git a/test/OpenTelemetry.Tests/Logs/BatchLogRecordExportProcessorTests.cs b/test/OpenTelemetry.Tests/Logs/BatchLogRecordExportProcessorTests.cs index ea43da16542..7c39f53e512 100644 --- a/test/OpenTelemetry.Tests/Logs/BatchLogRecordExportProcessorTests.cs +++ b/test/OpenTelemetry.Tests/Logs/BatchLogRecordExportProcessorTests.cs @@ -33,7 +33,8 @@ public void StateValuesAndScopeBufferingTest() List exportedItems = new(); using var exporter = new BatchLogRecordExportProcessor( - new InMemoryExporter(exportedItems)); + new InMemoryExporter(exportedItems), + scheduledDelayMilliseconds: int.MaxValue); using var scope = scopeProvider.Push(exportedItems); @@ -45,7 +46,6 @@ public void StateValuesAndScopeBufferingTest() logRecord.StateValues = state; exporter.OnEnd(logRecord); - exporter.Shutdown(); state.Dispose(); @@ -71,6 +71,8 @@ public void StateValuesAndScopeBufferingTest() null); Assert.True(foundScope); + + exporter.Shutdown(); } [Fact]