Skip to content

Commit f9f6f89

Browse files
authored
libgit2: Spread out the port selection a bit more (#59270)
We're still seeing the libgit2 tests intermittently fail here due to port re-use (#52310). I suspect what is happening is if we get super unlucky, we have two tests simultaneously in this section and they just bounce port 49152 back and forth between each other in the probe section, so that always the other process has it when openssl tries to acquire it. An even better solution would be to just pass the socket we already have to openssl, but for now, just try to spread out the port probe a bit more.
1 parent 4a83470 commit f9f6f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/LibGit2/test/libgit2-tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3063,7 +3063,7 @@ mktempdir() do dir
30633063
for attempt in 1:10
30643064
# Find an available port by listening, but there's a race condition where
30653065
# another process could grab this port, so retry on failure
3066-
port, server = listenany(49152)
3066+
port, server = listenany(49052 + rand(1:100) + attempt*10)
30673067
close(server)
30683068

30693069
# Make a fake Julia package and minimal HTTPS server with our generated

0 commit comments

Comments
 (0)