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

Try to fix more flaky tests #5509

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Try to fix more flaky tests #5509

merged 1 commit into from
Jun 15, 2021

Conversation

benmoss
Copy link
Member

@benmoss benmoss commented Jun 14, 2021

Lots of flakiness recently, which hopefully this can address.

The idea of this change being that prober.ReceiverDone() will poll for the receiver to have received all the sender's events, whereas before we were just doing prober.AssertReceivedAll. The latter works fine as long as the time between SenderDone and ReceiverDone is close to 0, which it seems to be on my machine. However if there's enough of a delay (as I think might be the case in a GitHub Action kind env), the assert will kick in before the receiver and it immediately will fail.

https://github.com/knative/eventing/runs/2817796102?check_suite_focus=true#step:12:4213
https://github.com/knative/eventing/runs/2818732715?check_suite_focus=true#step:12:5736
https://github.com/knative/eventing/runs/2820524189?check_suite_focus=true#step:12:4820
https://github.com/knative/eventing/runs/2821565820?check_suite_focus=true#step:12:4827
https://github.com/knative/eventing/runs/2821629829?check_suite_focus=true#step:12:5384
https://github.com/knative/eventing/runs/2822529840?check_suite_focus=true#step:12:4251

This polls, unlike AssertReceivedAll. My theory is that in slow
environments the time between sender being done and receiver being done
might be significant enough to fail a test.
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 14, 2021
@knative-prow-robot knative-prow-robot added area/test-and-release Test infrastructure, tests or release size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 14, 2021
@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #5509 (380830b) into main (b0b32c4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5509   +/-   ##
=======================================
  Coverage   82.74%   82.74%           
=======================================
  Files         198      198           
  Lines        6098     6098           
=======================================
  Hits         5046     5046           
  Misses        727      727           
  Partials      325      325           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0b32c4...380830b. Read the comment docs.

Copy link
Member

@matzew matzew 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

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmoss, matzew

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2021
@knative-prow-robot knative-prow-robot merged commit 39d1977 into knative:main Jun 15, 2021
aliok pushed a commit to aliok/eventing that referenced this pull request Jun 21, 2021
This polls, unlike AssertReceivedAll. My theory is that in slow
environments the time between sender being done and receiver being done
might be significant enough to fail a test.
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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants