Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: fix TestAcquireJobWithCancel_Cancel flake#18441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sreya merged 1 commit intomainfromjon/fixjob
Jun 19, 2025
Merged

Conversation

sreya
Copy link
Collaborator

@sreyasreya commentedJun 19, 2025
edited
Loading

The test was failing because it was checking for context.Canceled using xerrors.Is, but postgres returns a different error ("pq: canceling statement due to user request") when a query is cancelled. This change uses database.IsQueryCanceledError which properly handles both context.Canceled and postgres-specific cancellation errors.

fixescoder/internal#702

@sreyasreya changed the titlefix: handle postgres query cancellation in TestAcquireJobWithCancel_C…fix: flake TestAcquireJobWithCancel_CancelJun 19, 2025
@sreyasreya changed the titlefix: flake TestAcquireJobWithCancel_Cancelfix: fix TestAcquireJobWithCancel_Cancel flakeJun 19, 2025
@sreyasreya requested a review fromdeansheatherJune 19, 2025 02:06
…ancelThe test was failing because it was checking for context.Canceled usingxerrors.Is, but postgres returns a different error ("pq: cancelingstatement due to user request") when a query is cancelled. This changeuses database.IsQueryCanceledError which properly handles bothcontext.Canceled and postgres-specific cancellation errors.
@sreyasreya marked this pull request as ready for reviewJune 19, 2025 02:11
@sreyasreya requested review fromkylecarbs and removed request fordeansheatherJune 19, 2025 02:39
@sreyasreya merged commit8b27983 intomainJun 19, 2025
40 checks passed
@sreyasreya deleted the jon/fixjob branchJune 19, 2025 02:51
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 19, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@sreyasreya

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: TestAcquireJobWithCancel_Cancel
2 participants
@sreya@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp