Skip to content

TEST: Preserve sqlite_instance setup errors - #4856

Open
Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:test-sqlite-fixture-preserve-setup-error
Open

Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:test-sqlite-fixture-preserve-setup-error

Conversation

@richlundeen

Copy link
Copy Markdown
Contributor

Description

Preserve the original setup exception when the unit-test SQLite fixture fails before its engine is created. This prevents a secondary disposal error from masking the failure, as observed in run 47008045719, job 143918368921.

  • Dispose the fixture's memory only when it has an engine, retaining cleanup for failures after engine creation.
  • Cover ordinary initialization exceptions and pytest's timeout-style BaseException, including unchanged memory registrations and the absence of leaked connections.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change preserving original SQLite fixture initialization errors.

No open issues 🎉

What changed in this PR

Preserves original SQLite unit-test fixture setup errors instead of masking them with a secondary disposal failure.

Changes:

  • Dispose fixture memory only when its engine exists.
  • Add regression coverage for ordinary and timeout-style initialization failures, checking unchanged memory registrations and no leaked connections.
File Description
tests/​unit/​memory/​test_sqlite_fixtures.py Adds initialization-failure regression tests.
tests/​unit/​conftest.py Guards engine disposal after failed initialization.

Review effort: Balanced

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