Skip to content

fix(testing): stabilize Lambda host shutdown - #392

Merged
j-d-ha merged 11 commits into
mainfrom
ci/github-serialize-test-tfms
Aug 18, 2026
Merged

fix(testing): stabilize Lambda host shutdown#392
j-d-ha merged 11 commits into
mainfrom
ci/github-serialize-test-tfms

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stabilize Lambda test-host lifecycle teardown by ordering test-server shutdown, cancelling bootstrap work when the host stops, and disposing hosts after startup failures. Reduce test noise by configuring Lambda host logging and using awaited host-start delegation tests.

Serialize coverage test target frameworks while this shared-host shutdown path runs, preventing concurrent test hosts from overlapping in CI.

Changes

  • Coordinate LambdaTestServer shutdown with the hosted Lambda bootstrap cancellation path.
  • Dispose failed test hosts and centralize factory setup for test-server scenarios.
  • Configure test-host logging to suppress expected Lambda bootstrap and formatter initialization noise.
  • Update test cases to await host startup and assert runtime shutdown behavior.
  • Disable TFM parallelism only for coverage CI.

Validation

  • task format
  • DOTNET_NOLOGO=1 dotnet test --project tests/MinimalLambda.UnitTests/MinimalLambda.UnitTests.csproj --configuration Release -v q --filter-class "MinimalLambda.UnitTests.Application.LambdaApplicationTests" --minimum-expected-tests 1 --no-progress --no-ansi -p:TestTfmsInParallel=false

Notes for Reviewers

Coverage CI is intentionally serialized across target frameworks; regular build and test commands remain parallel. GitHub build check is currently pending.

@github-actions github-actions Bot added the type: ci CI/CD changes label Aug 17, 2026
j-d-ha and others added 10 commits August 17, 2026 15:41
Cancel test transactions only after host shutdown begins, so the Lambda bootstrap recognizes intentional cancellation.
Propagate ApplicationStopping before test-server transactions cancel, preventing RuntimeSupport from retrying a canceled poll.
Prevent failed test-server shutdown from leaving Lambda hosts alive until CI times out.
@j-d-ha j-d-ha changed the title ci(github): serialize coverage test TFMs fix(testing): stabilize Lambda host shutdown Aug 18, 2026

@ncipollina ncipollina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a substantitive change. Nice work!

@j-d-ha
j-d-ha merged commit f4c3836 into main Aug 18, 2026
7 checks passed
@j-d-ha
j-d-ha deleted the ci/github-serialize-test-tfms branch August 18, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants