-
Notifications
You must be signed in to change notification settings - Fork 41.1k
ktesting: abort entire test suite on SIGINT + /dev/tty #128606
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
base: master
Are you sure you want to change the base?
Conversation
When aborting an integration test with CTRL-C while it runs, the current test fails and etcd exits. But additional tests were still being started and the failed slowly because they couldn't connect to etcd. It's better to fail additional tests in ktesting.Init when the test run has already been interrupted. While at it, also make it a bit more obvious that testing was interrupted by logging it and update one comment about this. Example: $ go test -v ./test/integration/quota ... I1106 11:42:48.857162 147325 etcd.go:416] "Not using watch cache" resource="events.events.k8s.io" I1106 11:42:48.857204 147325 handler.go:286] Adding GroupVersion events.k8s.io v1 to ResourceManager W1106 11:42:48.857209 147325 genericapiserver.go:765] Skipping API events.k8s.io/v1beta1 because it has no resources. ^C INFO: canceling context: received interrupt signal {"level":"warn","ts":"2024-11-06T11:42:48.984676+0100","caller":"embed/serve.go:160","msg":"stopping insecure grpc server due to error","error":"accept tcp 127.0.0.1:44177: use of closed network connection"} ... I1106 11:42:50.042430 147325 handler.go:142] kube-apiserver: GET "/apis/rbac.authorization.k8s.io/v1/clusterroles" satisfied by gorestful with webservice /apis/rbac.authorization.k8s.io/v1 test_server.go:241: timed out waiting for the condition --- FAIL: TestQuota (11.45s) === RUN TestQuotaLimitedResourceDenial quota_test.go:292: testing has been interrupted: received interrupt signal --- FAIL: TestQuotaLimitedResourceDenial (0.00s) === RUN TestQuotaLimitService quota_test.go:418: testing has been interrupted: received interrupt signal --- FAIL: TestQuotaLimitService (0.00s) FAIL
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
/cc @googs1025 Are you perhaps interested in ktesting? This is a small tweak, more might come based on feedback for https://kcsna2024.sched.com/event/1nSjo/unified-framework-for-unit-integration-and-e2e-testing |
Thanks for the invitation, I will follow this topic 😄 |
The "received interrupt signal" is useful also when running with "go test" without -v because it shows that the shutdown has started. But more important is that a progress report gets shown because that feature is useful in particular when "go test" produces no output while it runs.
/assign @googs1025 |
/retest |
can we postpone this for next release to avoid adding functionality to test that may have a large blast radius when we are close to release? |
Yes, let's hold it for 1.33. /hold |
/test pull-kubernetes-e2e-gce maybe we can move to the next step ! |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
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 PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
When aborting an integration test with CTRL-C while it runs, the current test fails and etcd exits. But additional tests were still being started and the failed slowly because they couldn't connect to etcd.
It's better to fail additional tests in ktesting.Init when the test run has already been interrupted.
While at it, also make it a bit more obvious that testing was interrupted by logging it and update one comment about this.
Example:
Does this PR introduce a user-facing change?