Skip to content

test(sqlite): require a captured shutdown waiter - #2496

Merged
hidb4ai merged 1 commit into
oceanbase:masterfrom
AlexStocks:codex/2084-cleanup-regression-guard
Nov 5, 2026
Merged

hidb4ai merged 1 commit into
oceanbase:masterfrom
AlexStocks:codex/2084-cleanup-regression-guard

Conversation

@AlexStocks

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Related to #2084. Addresses the test feedback in #2468 (discussion_r4467789901).

Rationale for this change

The failed SQLite open regression checks that every observed shutdown future is complete. An empty observation list also passes all(...), so it could stop exercising worker cleanup without reporting a failure.

What changes are included in this PR?

Require at least one observed shutdown future before checking completion. Reuse the existing real-worker read-only and writable scenarios.

Are there any user-facing changes?

Test assertion only; no runtime, API, storage or dependency changes.

How was this change tested?

  • pytest tests/builtin/persistence/test_sqlite_profile.py -q -W error::pytest.PytestUnhandledThreadExceptionWarning: 47 passed each on Linux Python 3.11 / 3.12 and Windows Python 3.14.
  • Local mutation removes only the fixture's future recording: both cases pass without the new assertion and fail at the new assertion with it. The mutation is not committed.
  • Ruff check/format, full Linux ty check --python-version 3.11, changed-file prek hooks and git diff --check passed. Linux hooks used an isolated environment synced from the current lock with the server extra.

AI usage statement

OpenAI Codex assisted with review feedback verification, the assertion change and validation.

Make the failed-open regression fail when no worker shutdown future is observed,
instead of accepting an empty list through all().

Constraint: Preserve the SQLite runtime and supported driver behavior.
Scope-risk: Test assertion only; no API, storage or dependency changes.
Tested: SQLite profile 47 passed each on Python 3.11, 3.12 and 3.14; missing-capture mutation fails both cases; Linux changed-file hooks and full ty check passed.
@AlexStocks
AlexStocks requested a review from PsiACE as a code owner November 5, 2026 10:33
Copilot AI balanced review requested due to automatic review settings November 5, 2026 10:33

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

No open issues 🎉

What changed in this PR

Strengthens the SQLite open regression test to ensure it actually observes at least one worker shutdown future before asserting those futures are complete, preventing a vacuous all(...) pass when nothing was recorded.

Changes:

  • Add an assertion that at least one shutdown future (“shutdown waiter”) was captured before checking .done() on observed futures.
File Description
tests/​builtin/​persistence/​test_sqlite_profile.py Adds a non-empty check for captured shutdown futures to avoid vacuous passing regression tests.

Review effort: Lite

@PsiACE PsiACE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@hidb4ai hidb4ai 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.

LGTM

@hidb4ai hidb4ai added the 1.5.1 v1.5.1 release tracking label Nov 5, 2026
@hidb4ai
hidb4ai merged commit 39e89e9 into oceanbase:master Nov 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.1 v1.5.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants