Skip to content

test: lockingSpec advisory-lock + transaction tests need engine guards for H2 and SQL Server #2665

@bpamiri

Description

@bpamiri

Describe the bug

wheels.tests.specs.model.lockingSpec exercises advisory-lock and explicit-transaction behavior, but assumes the underlying DB supports these primitives. On engines/DBs where the primitive isn't supported, the spec errors instead of skipping gracefully:

Evidence

Compat-matrix run #25837380625 (2026-05-13). Lucee 6 + H2 = 4; Lucee 6 + SQL Server = 4; BoxLang across mysql/postgres/sqlite = 3.

Expected behavior

When the underlying DB doesn't support the locking primitive the spec is testing, the spec should be skipped for that DB (not errored). When it IS supported, the spec should pass.

The current state is "exercises feature, errors when feature is unavailable" — which makes the matrix unable to distinguish "lock implementation broken" from "lock not applicable to this DB."

Suggested fix shape

Two parts:

  1. Guard the lock-feature specs so they call $skip() (or equivalent) when the current DB adapter reports no advisory-lock support. The Wheels DB adapters know which features they support; check that.
  2. Investigate the BoxLang-on-supported-DBs Expected [false] to be true case separately — that suggests a real bug in lock-release-on-exception on BoxLang specifically. It's not a "feature unsupported" case (the DBs in question — mysql, postgres, sqlite — do support advisory locks), so it's likely a try/catch flow issue in the BoxLang adapter's locking path.

Additional context

Related: #2649, #2663

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions