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

OCPBUGS-20268: update bad url endpoint termination handler test #77

Merged

Conversation

elmiko
Copy link
Contributor

@elmiko elmiko commented Oct 9, 2023

This change moves the bad url test to its own Context block so that it does not get caught in the mock termination service counter. In some cases it is possible for the bad url test to be run first, when this happens the counter will never advance because the url is not valid. This produces a dead lock condition in the test. Migrating the test to its own block alleviates this issue.

This change also updates the "not fulfilled" test to ensure that the counter is updated when the http handler is replaced.

This change moves the bad url test to its own `Context` block so that it
does not get caught in the mock termination service counter. In some
cases it is possible for the bad url test to be run first, when this
happens the counter will never advance because the url is not valid.
This produces a dead lock condition in the test. Migrating the test to
its own block alleviates this issue.
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 9, 2023
@openshift-ci-robot
Copy link

@elmiko: This pull request references Jira Issue OCPBUGS-20268, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This change moves the bad url test to its own Context block so that it does not get caught in the mock termination service counter. In some cases it is possible for the bad url test to be run first, when this happens the counter will never advance because the url is not valid. This produces a dead lock condition in the test. Migrating the test to its own block alleviates this issue.

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.

@openshift-ci-robot
Copy link

@elmiko: This pull request references Jira Issue OCPBUGS-20268, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

In response to this:

This change moves the bad url test to its own Context block so that it does not get caught in the mock termination service counter. In some cases it is possible for the bad url test to be run first, when this happens the counter will never advance because the url is not valid. This produces a dead lock condition in the test. Migrating the test to its own block alleviates this issue.

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.

@elmiko
Copy link
Contributor Author

elmiko commented Oct 9, 2023

/hold found another issue

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2023
This test can be affected by the order of the tests being run and the
shared counter variable to record requests to the mock endpointer
server. The fix adds a reset to the counter and a special handler to
increase count.
@elmiko
Copy link
Contributor Author

elmiko commented Oct 9, 2023

added fix for counter update in not fulfilled test

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 9, 2023

@elmiko: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2023
@openshift-ci openshift-ci bot merged commit 0e3cf68 into openshift:main Oct 10, 2023
5 checks passed
@openshift-ci-robot
Copy link

@elmiko: Jira Issue OCPBUGS-20268: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-20268 has been moved to the MODIFIED state.

In response to this:

This change moves the bad url test to its own Context block so that it does not get caught in the mock termination service counter. In some cases it is possible for the bad url test to be run first, when this happens the counter will never advance because the url is not valid. This produces a dead lock condition in the test. Migrating the test to its own block alleviates this issue.

This change also updates the "not fulfilled" test to ensure that the counter is updated when the http handler is replaced.

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.

@elmiko elmiko deleted the fix-termination-handler-unit-tests branch October 10, 2023 12:47
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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants