Skip to content

Commit e254b88

Browse files
committed
✅ (tests) Fix tracer test in debug mode
1 parent f100725 commit e254b88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_tracer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ def test_traced_task(tmp_path):
1010
app = make_app("tests.tasks")
1111
assert isinstance(app.connector, InMemoryConnector)
1212

13+
# Reset stale notification handler from previous tests — the cached
14+
# InMemoryConnector may still reference a closed event loop from an
15+
# earlier sync worker run, causing _notify to fail with
16+
# "Event loop is closed" when it tries cross-thread scheduling.
17+
app.connector.on_notification = None
18+
1319
entity = ftm_model.make_entity("Person")
1420
entity.id = "test-entity-123"
1521
entity.add("name", "Test Person")

0 commit comments

Comments
 (0)