-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-13894] Unit test utilities in the ptest package #16830
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one small style comment, but otherwise LGTM!
p, s, col := Create(inputs) | ||
passert.EqualsList(s, col, inputs) | ||
if err := Run(p); err != nil { | ||
t.Errorf("create pipeline failed, got %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit (treat any style comments from me with a grain of salt since I'm new to the language): prefer identifying the function in your error - https://github.com/golang/go/wiki/TestComments#identify-the-function - and probably use "got, want" style, so ("Run(p) = %q, want nil", err)
In particular here (and below) the pipeline creation isn't really what's failing, its running the pipeline which could be an issue with Create, Run, or passert.EqualsList (but hopefully not since that's not what we're testing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to golang documentation is always appreciated. I've updated the message to your format with the one tweak of specifying that we returned an error. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks! Sorry for the delay.
Updates the ptest package to unit test the utility transforms provided.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunner
compliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.