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

chore: update testutil chan helpers#17408

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
aslilac merged 2 commits intomainfromlilac/testutil-chan
Apr 16, 2025
Merged

chore: update testutil chan helpers#17408

aslilac merged 2 commits intomainfromlilac/testutil-chan
Apr 16, 2025

Conversation

aslilac
Copy link
Member

  • RenameRequireRecvCtx toTryReceive
  • RenameRequireSendCtx toRequireSend
  • Remove unusedAssertSendCtx
  • AddRequireReceive function that will fail the test if the chan is closed

These new names more clearly describe their functionality.

  • The primary purpose of these helpers doesn't actually center around contexts, and mostly uses them as a way to cancel the channel read if the test times out.
  • RequireRecvCtx as it was implemented didn't actually require that you could read a value from the chan. It would just return a zero value if the chan was closed.
  • The newRequireReceive properly requires that a value is received from the chan.

@brettkolodny
Copy link
Contributor

Initially a scary amount of changes but looks good to me!

@aslilacaslilac merged commitf670bc3 intomainApr 16, 2025
29 checks passed
@aslilacaslilac deleted the lilac/testutil-chan branchApril 16, 2025 16:37
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@brettkolodnybrettkolodnybrettkolodny approved these changes

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@aslilac@brettkolodny

[8]ページ先頭

©2009-2025 Movatter.jp