Commit ee8f58c
fix(test): opt all EventManager tests into NonParallel collection to prevent thread-safety race
EventManager.Reset() creates a fresh Lazy<EventManager> backing the singleton,
but the switch is not atomic across threads. Under xUnit's default parallel
class execution, one test can call Reset() between another test's
EventManager.Instance invocations, causing listeners to be registered on
one instance and dispatched on another — producing empty callback assertions.
Fixes flaky failures observed on Ubuntu CI runners in CoreTest where the
test output is nondeterministic due to OS-level scheduling differences.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2aa4279 commit ee8f58c
5 files changed
Lines changed: 5 additions & 0 deletions
File tree
- tests/CoreTest
- Bootstrap
- Event
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments