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

pickfirst: Stop test servers without closing listeners #7872

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arjan-bal
Copy link
Contributor

Fixes: #7868

In the above issue, the test failed with the following error log:

pickfirstleaf_ext_test.go:700: Failed to start server: net.Listen("tcp", "127.0.0.1:39795") = listen tcp 127.0.0.1:39795: bind: address already in use

In the test, the server was shut down and it couldn't bind to the same port when it tried to start again. This PR uses restartable listeners for the test server and exposes a methods on the test server to stop and restart the servers without closing the listeners.

RELEASE NOTES: N/A

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.82%. Comparing base (8b70aeb) to head (446264a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7872      +/-   ##
==========================================
- Coverage   82.04%   81.82%   -0.22%     
==========================================
  Files         377      377              
  Lines       38065    38065              
==========================================
- Hits        31229    31148      -81     
- Misses       5542     5604      +62     
- Partials     1294     1313      +19     

see 21 files with indirect coverage changes

---- 🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky Test: Test/PickFirstLeaf_StopConnectedServer_SecondServerToFirst
2 participants