Commit bd86a10
committed
test(flagd): isolate @env-var scenarios from concurrent config reads
@env-var scenarios mutate process-global environment variables (e.g.
FLAGD_SYNC_PORT) that a concurrently-running config-default scenario reads at
build() time, causing intermittent wrong-value assertions (e.g. in-process port
resolving to 9999 instead of 8015). The existing ENV_VARS read-write lock only
serialized @env-var scenarios against each other. Give every scenario in an
engine a READ lock on ENV_VARS (keyed by its include tag); @env-var scenarios
escalate to read-write, so they run exclusively while no other scenario in the
engine reads config.
Signed-off-by: Simon Schrottner <simon.schrottner@gmail.com>1 parent 2f8afcf commit bd86a10
1 file changed
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
0 commit comments