Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
  • Loading branch information
2 people authored and github-actions committed Oct 31, 2025
commit a32d3844bbf6155c610b4ef277834f82362fa72c
3 changes: 3 additions & 0 deletions tests/Aspire.Dashboard.Tests/Integration/ServerRetryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public static async Task BindPortsWithRetry(Func<List<int>, Task> retryFunc, ILo
var port = GetAvailablePort(nextPortAttempt, logger);
ports.Add(port);

// Use a minimum gap of 10 between port allocations to reduce the risk of port collisions.
// Allocating consecutive ports (gap of 0) can lead to conflicts if the OS or other processes
// allocate ports in the same range. The random gap further reduces the chance of collision.
nextPortAttempt = port + Random.Shared.Next(10, 100);
}

Expand Down