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

e2e: fix a race in [reboots] tests. #439

Merged
merged 1 commit into from Aug 19, 2022

Conversation

jmencak
Copy link
Contributor

@jmencak jmencak commented Aug 19, 2022

Wait for a flip to MachineConfigPool UpdatedMachineCount == 0 prior to
waiting for it to be updated (== 1) again.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 19, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmencak

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 Aug 19, 2022
@jmencak
Copy link
Contributor Author

jmencak commented Aug 19, 2022

/assign @dagrayvid

@jmencak
Copy link
Contributor Author

jmencak commented Aug 19, 2022

/hold
I'll clean this up a bit

@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 Aug 19, 2022
@jmencak
Copy link
Contributor Author

jmencak commented Aug 19, 2022

/hold cancel
Works with my local HyperShift branch, yay!

@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 Aug 19, 2022
@jmencak
Copy link
Contributor Author

jmencak commented Aug 19, 2022

#438 merged
/retest

ginkgo.By("waiting for worker-rt MachineConfigPool UpdatedMachineCount == 1")
err = util.WaitForPoolUpdatedMachineCount(cs, "worker-rt", 1)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
waitForMCPFlip := func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we define this function somewhere else (e.g. test/e2e/util/util.go) and call it in all the spots this is being done in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for looking, David. I don't think this function has a place in test/e2e/util/util.go. I don't think I want to see any ginkgo.By() and gomega.Expect() there. Moving to operator_test.go, hopefully you're fine with that.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense, thanks.

I wanted to avoid duplicating these ~6 lines more than a couple times, and this accomplishes that.

Wait for a flip to MachineConfigPool UpdatedMachineCount == 0 prior to
waiting for it to be updated (== 1) again.
@dagrayvid
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 19, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 19, 2022

@jmencak: 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.

@openshift-merge-robot openshift-merge-robot merged commit b9bb486 into openshift:master Aug 19, 2022
@jmencak jmencak deleted the 4.12-fix-e2e-races branch August 20, 2022 04:04
IlyaTyomkin pushed a commit to IlyaTyomkin/cluster-node-tuning-operator that referenced this pull request May 23, 2023
Wait for a flip to MachineConfigPool UpdatedMachineCount == 0 prior to
waiting for it to be updated (== 1) again.

Co-authored-by: Jiri Mencak <jmencak@users.noreply.github.com>
IlyaTyomkin pushed a commit to IlyaTyomkin/cluster-node-tuning-operator that referenced this pull request Jun 13, 2023
Wait for a flip to MachineConfigPool UpdatedMachineCount == 0 prior to
waiting for it to be updated (== 1) again.

Co-authored-by: Jiri Mencak <jmencak@users.noreply.github.com>
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. 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