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

test: Increase disconnectTimeout to reduce test flakes #26

Merged
merged 3 commits into from
Jan 14, 2022
Merged

Conversation

kylecarbs
Copy link
Member

WebRTC uses UDP, which means a network connection is never open or closed. It uses timeouts to determine connection state; on a slow CI runner, these timeouts could be reached. Increasing this timeout should reduce flakes, but is unlikely to remove this flake entirely.

WebRTC uses UDP, which means a network connection is never open or closed. It uses timeouts to determine connection state; on a slow CI runner, these timeouts could be reached. Increasing this timeout should reduce flakes, but is unlikely to remove this flake entirely.
@kylecarbs kylecarbs self-assigned this Jan 14, 2022
@codecov
Copy link

codecov bot commented Jan 14, 2022

Codecov Report

Merging #26 (30ea590) into main (423611b) will increase coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   71.31%   71.47%   +0.15%     
==========================================
  Files          37       37              
  Lines        1311     1311              
  Branches        7        7              
==========================================
+ Hits          935      937       +2     
+ Misses        302      300       -2     
  Partials       74       74              
Flag Coverage Δ
unittest-go-macos-latest 63.51% <ø> (?)
unittest-go-ubuntu-latest 71.44% <ø> (+0.08%) ⬆️
unittest-go-windows-latest 63.60% <ø> (?)
unittest-js 71.01% <ø> (ø)
Impacted Files Coverage Δ
peer/conn.go 76.14% <0.00%> (+0.30%) ⬆️
peer/channel.go 88.05% <0.00%> (+0.62%) ⬆️

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 423611b...30ea590. Read the comment docs.

@@ -23,7 +23,7 @@ import (
)

const (
disconnectedTimeout = time.Millisecond * 200
Copy link
Contributor

Choose a reason for hiding this comment

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

thought (non-blocking): It's not clear to me why it would timeout at all given the connections are local 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

When CPU is contended in CI... this flake occurred because it took >200ms to negotiate the connection (which is ridiculously slow execution)!

Copy link
Contributor

@bryphe-coder bryphe-coder left a comment

Choose a reason for hiding this comment

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

Glad this improves the reliability of the tests! Increasing timeouts alone always makes me nervous (because code always finds a way of running just slow enough to still hit the timeout...) but cleaning up the servers with sch.Close() seems like it will help, too

Thanks for investigating these flaky test runs!

@bryphe-coder
Copy link
Contributor

Also looks like one we could backport to cdr/m as well to improve the test reliability there 🎉

@kylecarbs kylecarbs merged commit a461bc1 into main Jan 14, 2022
@kylecarbs kylecarbs deleted the disctime branch January 14, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants