Skip to content

Add acceptance test for data consumer throughput scenario - #6902

Merged
Youssef Fahmy (Youssef1313) merged 3 commits into
dev/ygerges/avoid-blockingfrom
copilot/sub-pr-6887
Nov 7, 2025
Merged

Youssef Fahmy (Youssef1313) merged 3 commits into
dev/ygerges/avoid-blockingfrom
copilot/sub-pr-6887

Conversation

Copilot AI commented Nov 7, 2025 •

Copy link
Copy Markdown
Contributor

Adds integration test to validate the fix for #6858, where excessive data consumers (> processor count) caused threadpool exhaustion and 20+ second delays on .NET Framework.

Changes

  • New test: DataConsumerThroughputTests.cs
    • Creates Environment.ProcessorCount * 5 data consumers
    • Asserts execution completes within 30 seconds
    • Reproduces the scenario from the issue where BlockingCollection was blocking threadpool threads

Test scenario

// Register multiple data consumers (5x processor count)
for (int i = 0; i < Environment.ProcessorCount * 5; i++)
{
    builder.TestHost.AddDataConsumer(_ => new MyDataConsumer());
}

// Before fix: 20+ seconds on .NET Framework
// After fix: < 5 seconds typically

The test validates that the channel-based implementation in PR #6887 resolves the threadpool blocking issue without introducing regressions.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI commented Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 37bvsblobprodcus311.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/testfx/testfx/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/testfx/testfx/artifacts/toolset/11.0.0-beta.25553.1.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Avoid BlockingCollection in AsyncConsumerDataProcessor Add acceptance test for data consumer throughput scenario Nov 7, 2025
@Youssef1313
Youssef Fahmy (Youssef1313) marked this pull request as ready for review November 7, 2025 11:40
@Youssef1313
Youssef Fahmy (Youssef1313) merged commit 649a73e into dev/ygerges/avoid-blocking Nov 7, 2025
@Youssef1313
Youssef Fahmy (Youssef1313) deleted the copilot/sub-pr-6887 branch November 7, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants