Skip to content
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
merged 3 commits into from
Sep 4, 2018

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Aug 30, 2018

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.

pohly and others added 3 commits August 30, 2018 11:59
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]:
       ....
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 30, 2018
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 30, 2018
@lpabon
Copy link
Member

lpabon commented Sep 4, 2018

Great job both @pohly and @darkowlzz

@lpabon
Copy link
Member

lpabon commented Sep 4, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2018
@lpabon
Copy link
Member

lpabon commented Sep 4, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 4, 2018
@k8s-ci-robot k8s-ci-robot merged commit 8f39c9c into kubernetes-csi:master Sep 4, 2018
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants