cluster-api-provider-vsphere
cluster-api-provider-vsphere copied to clipboard
Refine context in unit test
/kind bug
What steps did you take and what happened: [A clear and concise description of what the bug is.] Revisit the unit test and setup separate context for different test file or even test case based on specific scenario, instead of using the test-package variable here. We're seeing flaky errors in CI. This helps ensure that test case is kind of isolated and independent from others, which can make predictable and reliable test results.
- Move https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/d420ebd66a1709b899da1c73888ec5e08ba6f0b9/controllers/controllers_suite_test.go#L49 into the
setup()function and use context.Background in the other functions which did refer this context.
What did you expect to happen:
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
- Cluster-api-provider-vsphere version:
- Kubernetes version: (use
kubectl version): - OS (e.g. from
/etc/os-release):
Let's hold this work until we are sure about why it happened in 269023424b03a8c029ad95b605f0b6bf9431f9a3..b00e9811fd246af7a9e03676d9577b8ef56106d0 (compare) and if this would bring a benefit at all
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
I think we're fine now given unit tests are stable without it
/close
@sbueringer: Closing this issue.
In response to this:
I think we're fine now given unit tests are stable without it
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.