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

fix TestEventChannelFull random fail #76603

Merged
merged 2 commits into from May 9, 2019

Conversation

@changyaowei
Copy link
Contributor

commented Apr 15, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind failing-test

What this PR does / why we need it:
In unit test TestEventChannelFull, it will random fail, because the discard event is random, so when we check event , we should use include but not equal.

Which issue(s) this PR fixes:

Fixes #76989

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix TestEventChannelFull random fail
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

Hi @changyaowei. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@zhangxiaoyu-zidif

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

/ok-to-test

@changyaowei

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

@zhangxiaoyu-zidif

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

/sig-node

@mattjmcnaughton
Copy link
Contributor

left a comment

/lgtm

My one question is why we aren't seeing more consistent flakes because of this? Is it because, while Golang doesn't guarantee the ordering when iterating through a dictionary, it is "in practice" reproducible?

I think this change makes sense either way, I just want to be sure I'm understanding why we haven't been seeing more flakes.

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 15, 2019

@apelisse

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

I know that bazel runs the tests multiple times to detect flakes, so they're not "showing up there" (they are shown as flakes, but still pass with success)

@changyaowei

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

By test, we can find that Golang can't guarantee the ordering when iterating through a dictionary.

@mattjmcnaughton

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2019

Ah gotcha - good stuff, still lgtm :)

@changyaowei

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

/assign @Random-Liu

@mattjmcnaughton

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

ping @Random-Liu - I think fixing this issue will address #76989 :)

@changyaowei do you want to update the PR description accordingly to reference this fixes #76989

@changyaowei

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

ping @Random-Liu - I think fixing this issue will address #76989 :)

@changyaowei do you want to update the PR description accordingly to reference this fixes #76989

Already update, thanks for you advise

verifyEvents(t, expected, actual)
assert.True(t, len(actual) == 4, "channel length should be 4")
for _, actualEvent := range actual {
for _, expectedEvent := range expected {

This comment has been minimized.

Copy link
@Random-Liu

Random-Liu Apr 26, 2019

Member

Can we use assert.Contains? I remember it will do deep equal when comparing.

This comment has been minimized.

Copy link
@changyaowei

changyaowei Apr 27, 2019

Author Contributor

It can't work with assert.contains, i use assert.Subsetf instead

@mattjmcnaughton

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

@Random-Liu @changyaowei it'd be great to merge this if possible, because this flake just got reported in #sig-node. I think we run the risk of multiple fixing this will this remains open.

Thanks to both of you for your work on this :)

@Random-Liu

This comment has been minimized.

Copy link
Member

commented May 8, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label May 8, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: changyaowei, Random-Liu

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 merged commit 60a4c3c into kubernetes:master May 9, 2019

20 checks passed

cla/linuxfoundation changyaowei authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.