-
Notifications
You must be signed in to change notification settings - Fork 112
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify purpose of handler_stream_test.go #472
Clarify purpose of handler_stream_test.go #472
Conversation
Hi @Hirochon - thank you for opening this PR! Unfortunately, I'd rather not merge the extra tests you've added. The existing test verifies that the However, this PR did highlight that the existing test isn't well-documented. I've pushed some commits to your branch to remove the extra tests and add better documentation. I'm going to amend the PR title and description and merge this in, so that you're still credited in the next set of release notes. |
@Hirochon's original PR description, for posterity: This pull request adds tests for ServerStream and BidiStream, in addition to the existing tests for ClientStream. Specifically, the tests cover the following cases:
I have implemented the tests using the |
Hi @akshayjshah |
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/bufbuild/connect-go](https://togithub.com/bufbuild/connect-go) | require | minor | `v1.5.2` -> `v1.6.0` | --- ### Release Notes <details> <summary>bufbuild/connect-go</summary> ### [`v1.6.0`](https://togithub.com/bufbuild/connect-go/releases/tag/v1.6.0) [Compare Source](https://togithub.com/bufbuild/connect-go/compare/v1.5.2...v1.6.0) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Enhancements - Improve comments & add procedure consts to generated code by [@​akshayjshah](https://togithub.com/akshayjshah) in [https://github.com/bufbuild/connect-go/pull/480](https://togithub.com/bufbuild/connect-go/pull/480) - Reduce per-call URL parsing cost by [@​mattrobenolt](https://togithub.com/mattrobenolt) in [https://github.com/bufbuild/connect-go/pull/467](https://togithub.com/bufbuild/connect-go/pull/467) - Improve errors for outdated protobuf runtimes by [@​akshayjshah](https://togithub.com/akshayjshah) in [https://github.com/bufbuild/connect-go/pull/465](https://togithub.com/bufbuild/connect-go/pull/465) - Switch README to use `buf curl` by [@​akshayjshah](https://togithub.com/akshayjshah) in [https://github.com/bufbuild/connect-go/pull/474](https://togithub.com/bufbuild/connect-go/pull/474) ##### Bugfixes - Clarify purpose of handler_stream_test.go by [@​Hirochon](https://togithub.com/Hirochon) in [https://github.com/bufbuild/connect-go/pull/472](https://togithub.com/bufbuild/connect-go/pull/472) - Make StreamType constants typed numerics by [@​jhump](https://togithub.com/jhump) in [https://github.com/bufbuild/connect-go/pull/486](https://togithub.com/bufbuild/connect-go/pull/486) - Populate Spec and Peer in Client.CallServerStream by [@​jhump](https://togithub.com/jhump) in [https://github.com/bufbuild/connect-go/pull/487](https://togithub.com/bufbuild/connect-go/pull/487) #### New Contributors - [@​Hirochon](https://togithub.com/Hirochon) made their first contribution in [https://github.com/bufbuild/connect-go/pull/472](https://togithub.com/bufbuild/connect-go/pull/472) **Full Changelog**: bufbuild/connect-go@v1.5.2...v1.6.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4zMS40IiwidXBkYXRlZEluVmVyIjoiMzUuMzEuNCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Clarify that the sole purpose of the test in `handler_stream_test.go` is to verify a safety property of the `ClientStream` iterator. A similar testing strategy isn't worthwhile for `ServerStream` or `BidiStream`, because they're not iterators. --------- Co-authored-by: Akshay Shah <[email protected]>
Clarify that the sole purpose of the test in
handler_stream_test.go
is to verify a safety property of theClientStream
iterator. A similar testing strategy isn't worthwhile forServerStream
orBidiStream
, because they're not iterators.