Skip to content

Tests in SqliteCommandTest are flaky #35585

Description

@AndriySvyryd

Flaky tests:

  • ExecuteReader_retries_when_locked
  • ExecuteReader_retries_when_busy
  • ExecuteScalar_throws_when_busy_with_returning
  • ExecuteNonQuery_throws_when_busy_with_returning
  • ExecuteReader_throws_when_busy_with_returning
  • ExecuteReader_throws_when_busy_with_returning_while_draining

Error:

Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'no such table: Data'.

These failures don't seem to be platform-specific.

Activity

  1. added this to the Backlog milestone on Feb 4, 2025
  2. added theissue type on Oct 9, 2025
  3. modified the milestones: Backlog, MQ on Oct 9, 2025
  4. Manish-1kumar commented on Nov 3, 2026

    @Manish-1kumar
    Contributor

    I've submitted a fix for this in PR #39510.

    Root cause: All six skipped tests used hardcoded shared SQLite database names (locked, �usy.db,
    eturning.db). When tests run in parallel, they collide on the same database, causing spurious
    o such table: Data errors and lock-contention failures.

    Fix: Replace hardcoded names with Guid.NewGuid():N-prefixed unique names per test invocation. This eliminates all cross-test state bleed without changing any test assertions or retry logic.

    Results: All 6 previously-skipped tests now pass. Full suite: 814 passed, 1 skipped (the unrelated Collations_dont_bleed_across_connections skip for ericsink/SQLitePCL.raw#421), 0 failed.

  5. added a commit that references this issue on Nov 4, 2026
    7ec4638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions