Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use System.nanoTime() for Random seed in SocketUtils
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
- Loading branch information