diff --git a/test/TestBuildingBlocks/IntegrationTest.cs b/test/TestBuildingBlocks/IntegrationTest.cs index 92f49879fc..69776e7b5d 100644 --- a/test/TestBuildingBlocks/IntegrationTest.cs +++ b/test/TestBuildingBlocks/IntegrationTest.cs @@ -12,10 +12,16 @@ namespace TestBuildingBlocks; /// public abstract class IntegrationTest : IAsyncLifetime { - private static readonly SemaphoreSlim ThrottleSemaphore = new(64); + private static readonly SemaphoreSlim ThrottleSemaphore; protected abstract JsonSerializerOptions SerializerOptions { get; } + static IntegrationTest() + { + int maxConcurrentTestRuns = Environment.GetEnvironmentVariable("APPVEYOR") != null ? 32 : 64; + ThrottleSemaphore = new SemaphoreSlim(maxConcurrentTestRuns); + } + public async Task<(HttpResponseMessage httpResponse, TResponseDocument responseDocument)> ExecuteHeadAsync(string requestUrl, Action? setRequestHeaders = null) {