BaryoDev / BaryoDev/barakoCMS

Two hosts in one test process fight over process-wide FastEndpoints and JWT state

Open
#554 0 comments 0 reactions 1 assignee Claimed by @arnelirobles View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.