mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
35582ded0e
Prior to this commit, SocketUtils used System.currentTimeMillis() for the seed for the java.util.Random instance used internally. The use of the milliseconds value returned by currentTimeMillis() can lead to collisions for randomly selected free ports for tests executing in parallel on the same computer. This commit therefore switches to System.nanoTime() for the Random seed used in SocketUtils in an attempt to avoid such collisions for tests executing in parallel in different JVMs on the same computer. Closes gh-25321