Skip to content

Commit 9b6fac9

Browse files
committed
Reduce the number of concurrent testruns in cibuild
1 parent be99234 commit 9b6fac9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/TestBuildingBlocks/IntegrationTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ namespace TestBuildingBlocks;
1212
/// </summary>
1313
public abstract class IntegrationTest : IAsyncLifetime
1414
{
15-
private static readonly SemaphoreSlim ThrottleSemaphore = new(64);
15+
private static readonly SemaphoreSlim ThrottleSemaphore;
1616

1717
protected abstract JsonSerializerOptions SerializerOptions { get; }
1818

19+
static IntegrationTest()
20+
{
21+
int maxConcurrentTestRuns = Environment.GetEnvironmentVariable("APPVEYOR") != null ? 32 : 64;
22+
ThrottleSemaphore = new SemaphoreSlim(maxConcurrentTestRuns);
23+
}
24+
1925
public async Task<(HttpResponseMessage httpResponse, TResponseDocument responseDocument)> ExecuteHeadAsync<TResponseDocument>(string requestUrl,
2026
Action<HttpRequestHeaders>? setRequestHeaders = null)
2127
{

0 commit comments

Comments
 (0)