fx icon indicating copy to clipboard operation
fx copied to clipboard

Example test failing in master branch when port 8080 is already in use (89f4a90)

Open jmmills opened this issue 1 year ago • 3 comments

Describe the bug At rev 89f4a90 Example test is failing

To Reproduce run anything that listens on port 8080, then make test

Expected behavior Passing tests

Additional context

--- FAIL: Example (0.00s)
got:
Executing NewLogger.
Executing NewMux.
Executing NewHandler.
Starting HTTP server.
Stopping HTTP server.
want:
Executing NewLogger.
Executing NewMux.
Executing NewHandler.
Starting HTTP server.
Got a request.
Stopping HTTP server.
FAIL

jmmills avatar Feb 08 '24 20:02 jmmills

Test passes for me, and in CI, FWIW. Where are you running this?

abhinav avatar Feb 08 '24 21:02 abhinav

Hi Jason! good to see ya around again 👋

Seems like I can't repro this either on any of my machines. Is this reproing consistently for you? or is it flaky

sywhang avatar Feb 08 '24 23:02 sywhang

@sywhang @abhinav I discovered the issue, which is that in my environment port 8080 is not available to bind too, which causes the tests to fail. These should likely be moved to using port a random port and fx.Populate a net.Addr type to use with clients.

jmmills avatar Feb 09 '24 21:02 jmmills