Commit cf65d40
committed
fix(tests): Enable background loop in emit_event test to fix queue assertion
The test_emit_event test was failing because it expected the event to be
placed in the queue, but emit_event() has conditional logic:
- When _running=False (test mode): processes event immediately
- When _running=True (production): queues event for async processing
The test creates a CacheInvalidationManager with _running=False by default,
so events get processed immediately rather than queued. The test then
checked if event_queue.empty(), which failed because the queue was never used.
Fix: Set manager._running = True before calling emit_event() so the event
gets queued as the test expects.
Result: All 82 tests now passing ✅1 parent 77513d6 commit cf65d40
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| |||
0 commit comments