Skip to content

micro_http: fix doctest socket conflicts#76

Open
Lencerf wants to merge 1 commit into
firecracker-microvm:mainfrom
Lencerf:main
Open

micro_http: fix doctest socket conflicts#76
Lencerf wants to merge 1 commit into
firecracker-microvm:mainfrom
Lencerf:main

Conversation

@Lencerf

@Lencerf Lencerf commented Jul 13, 2026

Copy link
Copy Markdown

Reason for This PR

Doctests in lib.rs and server.rs were both using the same hardcoded socket path /tmp/example.sock. When running tests in parallel, this caused conflicts and sporadic failures with AddrInUse.

Description of Changes

Fix this by using unique socket paths for each doctest.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any newly added unsafe code is properly documented.
  • Any user-facing changes are mentioned in CHANGELOG.md.

Doctests in `lib.rs` and `server.rs` were both using the same hardcoded
socket path `/tmp/example.sock`. When running tests in parallel, this
caused conflicts and sporadic failures with `AddrInUse`.

Fix this by using unique socket paths for each doctest.

Assisted-by: Antigravity:Gemini-3.5-Flash
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
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