Skip to content

Conversation

nolanleastin
Copy link
Contributor

tests.unit.test_flow.TestInstalledAppFlow attempts to create a new server at the specified host:port. New server creation occasionally results in 'address already in use' because the socket will be unavailable for a period of time after the socket is closed, resulting in flaky test failures.

Work around this in the tests by letting the OS pick an available port each time.

Fixes #381

@nolanleastin nolanleastin requested review from a team as code owners April 1, 2025 17:46
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Apr 1, 2025
@harkamaljot
Copy link
Contributor

please fix linters, but other than that looks good

@nolanleastin nolanleastin changed the title Let OS pick an available port when running TestInstalledAppFlow Let OS selects available port when running TestInstalledAppFlow Apr 1, 2025
@nolanleastin nolanleastin changed the title Let OS selects available port when running TestInstalledAppFlow Let OS select an available port when running TestInstalledAppFlow Apr 1, 2025
tests.unit.test_flow.TestInstalledAppFlow attempts to create a new
server at the specified host:port. New server creation occasionally
results in 'address already in use' because the socket will be
unavailable for a period of time after the socket is closed, resulting
in flaky test failures.

Work around this in the tests by letting the OS pick an available port each time.

Fixes #381
@nolanleastin nolanleastin merged commit 6060d65 into main Apr 1, 2025
17 of 24 checks passed
@nolanleastin nolanleastin deleted the neastin-378871875 branch April 1, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests.unit.test_flow.TestInstalledAppFlow: test_run_local_server_audience failed
3 participants