Skip to content

Remove explicit StartServer() from TestWebApplicationFactory#15

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/run-dotnet-tests-release
Draft

Remove explicit StartServer() from TestWebApplicationFactory#15
Copilot wants to merge 4 commits intomasterfrom
copilot/run-dotnet-tests-release

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

  • Analyze root cause: EmbeddedServer.Instance is a process-wide singleton, but TestWebApplicationFactory and PostSchedulingStrategyTests each had separate static fields + locks, creating a race where StartServer() could be called twice
  • Remove MyGet feed from NuGet.Config (packages are on nuget.org, MyGet is unreachable)
  • Create shared EmbeddedServerHelper class with a single lock + StartServer() call that both test classes use
  • Update TestWebApplicationFactory to use EmbeddedServerHelper.Instance
  • Update PostSchedulingStrategyTests to use EmbeddedServerHelper.Instance
  • Build and run tests — all 66 tests pass (including previously failing 3 BlogConfigBehavior tests)
  • Code review and security checks

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits March 27, 2026 13:42
…fix 'server already started' error

Agent-Logs-Url: https://github.com/gregolsky/RaccoonBlog/sessions/ed757379-c3ab-44ad-8df4-40c1e97c934f

Co-authored-by: gregolsky <1541805+gregolsky@users.noreply.github.com>
…fix 'server already started' error

Agent-Logs-Url: https://github.com/gregolsky/RaccoonBlog/sessions/ed757379-c3ab-44ad-8df4-40c1e97c934f

Co-authored-by: gregolsky <1541805+gregolsky@users.noreply.github.com>
Copilot AI requested a review from gregolsky March 27, 2026 14:50
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