diff --git a/test/Polly.Extensions.Tests/Issues/IssuesTests.StrategiesPerEndpoint_1365.cs b/test/Polly.Extensions.Tests/Issues/IssuesTests.StrategiesPerEndpoint_1365.cs index 6d0a5541740..9122fddab03 100644 --- a/test/Polly.Extensions.Tests/Issues/IssuesTests.StrategiesPerEndpoint_1365.cs +++ b/test/Polly.Extensions.Tests/Issues/IssuesTests.StrategiesPerEndpoint_1365.cs @@ -13,7 +13,7 @@ public partial class IssuesTests [Fact] public void StrategiesPerEndpoint_1365() { - var events = new List(); + var events = new List(1024); using var listener = TestUtilities.EnablePollyMetering(events); var services = new ServiceCollection(); diff --git a/test/Polly.Extensions.Tests/Telemetry/TelemetryListenerImplTests.cs b/test/Polly.Extensions.Tests/Telemetry/TelemetryListenerImplTests.cs index bc86c98e304..c8e5b92edc1 100644 --- a/test/Polly.Extensions.Tests/Telemetry/TelemetryListenerImplTests.cs +++ b/test/Polly.Extensions.Tests/Telemetry/TelemetryListenerImplTests.cs @@ -12,7 +12,7 @@ public class TelemetryListenerImplTests : IDisposable { private readonly FakeLogger _logger; private readonly ILoggerFactory _loggerFactory; - private readonly List _events = []; + private readonly List _events = new(1024); private Action>? _onEvent; public TelemetryListenerImplTests() => _loggerFactory = TestUtilities.CreateLoggerFactory(out _logger);