Commit 3234068
committed
Fix test isolation issue in publisher spec
Reset Connection singleton between tests to prevent mock leakage.
The Connection singleton was caching the mocked JetStream context
across test examples, causing RSpec to detect double leakage when
tests ran in certain orders.
Fixes issue where 'persists exception when publish raises error'
test would fail with 'Double was originally created in one example
but has leaked into another example' error.1 parent 7304500 commit 3234068
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
271 | | - | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
0 commit comments