Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions tests/test_isolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,21 @@ async def test_03_use_repository(self):
FLAKY: Depends on both test_01 and test_02
FIX: Independent setup
"""
repo = TestDatabaseSetupDependency._repository

# FLAKY: Repository might not exist
assert repo is not None, "Repository not created"

# Would fail if pool wasn't initialized
result = await repo.find_by_id(1)
pool = TestDatabaseSetupDependency._pool

# Ensure pool is initialized
if pool is None:
pool = ConnectionPool("test_iso_pool", min_connections=2, max_connections=5)
await pool.initialize()

repo = TestDatabaseSetupDependency._repository

# Ensure repository is initialized
if repo is None:
repo = Repository("users", pool)

# Would fail if pool wasn't initialized
result = await repo.find_by_id(1)


class TestCacheWarmupDependency:
Expand Down
Loading