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

A thread safe way to take a free port #485

Merged
merged 12 commits into from
Aug 16, 2022
Merged

A thread safe way to take a free port #485

merged 12 commits into from
Aug 16, 2022

Conversation

JekaMas
Copy link
Contributor

@JekaMas JekaMas commented Aug 4, 2022

This PR provides a common function to find available port during tests and to avoid usage of conflicting ports in tests (which caused a lot of them to fail un-deterministically).

Moreover, to be more deterministic in case of GRPC server, it directly propagates the net.Listener object for port safety.

It also adds server options while creating server which is useful for tests.

@manav2401 manav2401 requested a review from a team August 16, 2022 11:30
@JekaMas JekaMas merged commit 3c94dfb into develop Aug 16, 2022
@manav2401 manav2401 deleted the net-port-data-race branch August 17, 2022 06:04
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.

3 participants