-
Notifications
You must be signed in to change notification settings - Fork 152
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
pkg/sanity: Use a single grpc connection via caching in SanityContext #105
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connecting once per test made testing flaky. We could fix this with retries (kubernetes-csi#97) but that requires more discussion, so instead we just connect once per process instead of once per test case. This was also said to be faster (kubernetes-csi#98). Fixes: kubernetes-csi#101
Only the test suite itself may use those functions, but not the tests. Should we ever accidentally add them back, then Ginkgo will fail to run the embedded test case: $ go test -v ./hack/_embedded/ panic: You may only call BeforeSuite once! goroutine 1 [running]: ....
lpabon
approved these changes
Sep 4, 2018
Great job both @pohly and @darkowlzz |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lpabon, pohly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
suneeth51
pushed a commit
to suneeth51/csi-test
that referenced
this pull request
Sep 11, 2019
pkg/sanity: Use a single grpc connection via caching in SanityContext
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
cncf-cla: yes
Indicates the PR's author has signed the CNCF CLA.
lgtm
"Looks good to me", indicates that a PR is ready to be merged.
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This uses the same approach as PR #98 to combat connection issues (connecting only once per process), but implements it so that the tests can still be embedded, by caching the existing connection in the SanityContext.
@darkowlzz I liked the API tests that you added to PR #98, so I've copied your commit into this PR and extended the one about embedding so that it actually catches when the tests (incorrectly) try to use their own Before/AfterSuite functions.