Two hosts in one test process fight over process-wide FastEndpoints and JWT state
Open
documentation
- Dominant language
- C#
- Stars
- 6
- Forks
- 7
- Avg merge
- 4h 21m
- Merged PRs (30d)
- 307
Description
Core JWT validation settings and FastEndpoints endpoint configuration are process-wide statics. A second in-process host with a different `JWT:Key`, or two hosts starting at once, breaks the first.
#540 worked around it inside `BarakoCMS.Testing` with a per-host key and a sequential collection, so our own suite is fine. A module author who spins up two hosts in one test process will hit it and will have no idea why.
The constraint lives in FastEndpoints, not here, so the fix here is to document it in the module testing guide and point at what `BarakoCMS.Testing` does about it.
Found while verifying #540.
Contributor guide
Assessment
This issue has not been assessed yet.