Skip to content

Migrate alignment integration tests to use fixtures across adapters - #128

Open
CorinChappy wants to merge 1 commit into
mainfrom
cc-integration-test-alignment-fixtures
Open

CorinChappy wants to merge 1 commit into
mainfrom
cc-integration-test-alignment-fixtures

Conversation

@CorinChappy

Copy link
Copy Markdown
Contributor

This provides better reporting for assertion errors and IDE support for test running

This provides better reporting for assertion errors and IDE support for test running
Copilot AI lite review requested due to automatic review settings September 25, 2026 11:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A critical event-loop pool issue and a moderate cleanup-table issue remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Migrates projection adapter integration tests to shared fixtures across in-memory and PostgreSQL adapters.

Changes:

  • Adds parametrized adapter harnesses and fixtures.
  • Removes duplicated adapter tests.
  • Standardizes async fixture and pool lifecycle management.
File Summary
tests/​unit/​logicblocks/​event/​projection/​store/​adapters/​test_memory.py Removes superseded memory adapter tests.
tests/​shared/​logicblocks/​event/​testsupport/​db.py Updates pool lifecycle management.
tests/​shared/​logicblocks/​event/​testcases/​projection/​store/​harnesses.py Moderate (4 votes): clear_storage() truncates events instead of projections.
tests/​integration/​logicblocks/​event/​store/​adapters/​test_postgres.py Updates async fixtures.
tests/​integration/​logicblocks/​event/​projection/​store/​adapters/​test_postgres.py Removes duplicated PostgreSQL tests.
tests/​integration/​logicblocks/​event/​projection/​store/​adapters/​test_adapters.py Uses parametrized harness fixtures.
tests/​integration/​logicblocks/​event/​projection/​store/​adapters/​conftest.py Critical (3 votes): Session-scoped pool may be reused across incompatible event loops.
tests/​integration/​logicblocks/​event/​processing/​broker/​strategies/​distributed/​test_broker.py Updates async fixtures.
tests/​integration/​logicblocks/​event/​processing/​broker/​strategies/​distributed/​subscriptions/​stores/​state/​test_postgres.py Updates async fixtures.
tests/​integration/​logicblocks/​event/​processing/​broker/​strategies/​distributed/​subscribers/​stores/​state/​test_postgres.py Updates async fixtures.
tests/​component/​test_processing.py Updates async fixtures.
tests/​component/​test_asynchronous_projections.py Updates async fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

)


@pytest_asyncio.fixture(scope="session", loop_scope="session")
Comment on lines +42 to +43
async def clear_storage(self) -> None:
await clear_table(self.pool, "events")

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants