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

tests: tweak timings so we cancel during HTTP processing #696

Conversation

justinsb
Copy link
Contributor

There are 3 possibilities:

  • We cancel before the HTTP request (possibly even before the dial has completed)
  • We cancel during the delay in our slow server
  • We cancel after request processing

Because our intervals were [0, 1s] and [0.5s, 2s] I think we
previously could have hit all three cases.

Likely there is a bug lurking in one of these three cases,
but let's start by making the delays such that we are
always in the second situation (assuming dialing localhost
takes < 1s)

We now delay the HTTP response by 3 seconds, and cancel
after a random value in the interval [1s, 2s)

@k8s-ci-robot k8s-ci-robot requested review from elmiko and ipochi January 25, 2025 00:25
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2025
There are 3 possibilities:
* We cancel before the HTTP request (possibly even before the dial has completed)
* We cancel during the delay in our slow server
* We cancel after request processing

Because our intervals were [0, 1s] and [0.5s, 2s] I think we
previously could have hit all three cases.

Likely there is a bug lurking in one of these three cases,
but let's start by making the delays such that we are
always in the second situation (assuming dialing localhost
takes < 1s)

We now delay the HTTP response by 3 seconds, and cancel
after a random value in the interval [1s, 2s)
@justinsb justinsb force-pushed the more_deterministic_delayed_server branch from 5d421a6 to ea4e1e6 Compare January 25, 2025 00:33
@justinsb
Copy link
Contributor Author

OK, a full green run. But maybe it's just luck...

/retest

@justinsb
Copy link
Contributor Author

/test pull-apiserver-network-proxy-test-master

@justinsb
Copy link
Contributor Author

Still green, but just in case ...

/test pull-apiserver-network-proxy-test-master

@justinsb
Copy link
Contributor Author

/assign @cheftako

@cheftako
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, justinsb

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 Jan 26, 2025
@k8s-ci-robot k8s-ci-robot merged commit eb2aa88 into kubernetes-sigs:master Jan 26, 2025
22 checks passed
k8s-ci-robot added a commit that referenced this pull request Jan 30, 2025
Cherry-pick #696 tests: tweak timings so we cancel during HTTP processing
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants