Skip to content

test: stabilize background-run log scenario#405

Merged
jongalloway merged 1 commit intomainfrom
fix/background-run-scenario-log-polling
Mar 17, 2026
Merged

test: stabilize background-run log scenario#405
jongalloway merged 1 commit intomainfrom
fix/background-run-scenario-log-polling

Conversation

@jongalloway
Copy link
Copy Markdown
Owner

Summary

Fixes the Ubuntu release-scenarios CI failure by replacing a fixed sleep in the background-run logs scenario with polling for the expected log fragments.

Problem

The release-scenarios workflow failed in Scenario_BackgroundRun_RetrieveLogs_Success because the test assumed the background process would emit all expected log lines within 2 seconds. On slower CI runners, the process startup and log capture can take longer.

Change

  • add a helper that polls dotnet_project Logs until the expected stdout and stderr fragments are present or a timeout is reached
  • use that helper in Scenario_BackgroundRun_RetrieveLogs_Success instead of a fixed Task.Delay(2000)

Validation

  • dotnet build DotNetMcp.slnx --configuration Release
  • DOTNET_MCP_SCENARIO_TESTS=1 dotnet test --project DotNetMcp.Tests/DotNetMcp.Tests.csproj --no-build --configuration Release --verbosity normal -- --filter-method *Scenario_BackgroundRun_RetrieveLogs_Success
  • DOTNET_MCP_SCENARIO_TESTS=1 dotnet test --project DotNetMcp.Tests/DotNetMcp.Tests.csproj --no-build --configuration Release --verbosity normal -- --filter-namespace DotNetMcp.Tests.Scenarios

Related CI run: https://github.com/jongalloway/dotnet-mcp/actions/runs/23210332665/job/67457113307#step:8:33

@jongalloway jongalloway merged commit ee4eb6c into main Mar 17, 2026
4 checks passed
@jongalloway jongalloway deleted the fix/background-run-scenario-log-polling branch March 17, 2026 18:52
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.

1 participant