Skip to content

Fix SQLite transaction cancellation test race - #11922

Merged
stephanos merged 2 commits into
mainfrom
stephanos/nexus-race-list
Sep 4, 2026
Merged

Fix SQLite transaction cancellation test race#11922
stephanos merged 2 commits into
mainfrom
stephanos/nexus-race-list

Conversation

@stephanos

@stephanos stephanos commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fix a test data race caused by passing the address of sql.ErrNoRows to assert.ErrorAs.

Since errors.As writes the matching error into its target, the assertion could mutate the package-level sentinel while parallel persistence tests read it.

Use require.ErrorIs to verify sentinel identity without mutating global state.

@stephanos stephanos changed the title Fix SQLite transaction cancellation test race Fix SQLite transaction cancellation test race Sep 3, 2026
@stephanos stephanos changed the title Fix SQLite transaction cancellation test race Fix SQLite transaction cancellation test race Sep 3, 2026
@stephanos
stephanos marked this pull request as ready for review September 3, 2026 17:46
@stephanos
stephanos requested review from a team as code owners September 3, 2026 17:46
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @stephanos's task in 1m 6s —— View job


Reviewed 1 file, 1 finding.
• branch stephanos/nexus-race-list

Comment thread common/persistence/tests/sqlite_test.go Outdated
@stephanos
stephanos merged commit 2792bc8 into main Sep 4, 2026
91 checks passed
@stephanos
stephanos deleted the stephanos/nexus-race-list branch September 4, 2026 00:07
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