-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃尡 addr.Suggest should lock a file instead of memory #1563
Conversation
de49419
to
a31ea38
Compare
This would help specifically for parallel testing of one package but not multiple packages, right? Since those each get their own entrypoint binary so would be independent tempdirs? |
a31ea38
to
3d2ba49
Compare
Are you referring to darwin? |
3d2ba49
to
55b1cf7
Compare
TILd |
55b1cf7
to
fc7c795
Compare
Looks like you took care of it with UserCacheDir, nice :) |
Does this stop one test process from stopping envtest on test completion causing flakes across multiple packages? |
This stops a race condition that could happen in the event that the same port is allocated and closed quickly between two processes, where one end up not starting because either etcd or api-server is reusing a port. |
fc7c795
to
72c8542
Compare
d1ff9ab
to
d182594
Compare
Envtest is often running in parallel when using go test, which spins up multiple indipendent go test processes that cannot talk to each other. The address suggestion code, mostly used to find an open port, can cause port collisions and a race condition between different envtests running at the same time. This change switches the internal memory to use a file based system that creates a file. Signed-off-by: Vince Prignano <vincepri@vmware.com>
d182594
to
58c17f6
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, vincepri 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 |
@vincepri We just updated to |
@Porges Thanks for the report, running some tests locally with the exclusive and non-blocking flags. Can you open an issue and give some more information on your environment, how many envtests are you running in parallel, and the information you found? |
Envtest is often running in parallel when using go test, which spins up
multiple indipendent go test processes that cannot talk to each other.
The address suggestion code, mostly used to find an open port, can
cause port collisions and a race condition between different envtests
running at the same time.
This change switches the internal memory to use a file based system that
creates a file.
Signed-off-by: Vince Prignano vincepri@vmware.com