facebook/nifty — pull request #68 by andrewcox (2013-06-11 21:20:02+00:00)
Title: Fix test race condition

When finding an available port by binding a temporary ServerSocket to port 0, and then later using that port, the port might have been consumed by another test. Instead, tests should just bind the nifty server directly to port 0 and get the actual port it was bound to using getServerChannel after starting the server, and looking up the actual locally bound address.