rackerlabs/gdeproxy — pull request #32 by izrik (2013-09-10 19:06:17+00:00)
Title: Portfinder singleton

This pull request adds a singleton object to the PortFinder class. If a user wants to use PortFinder in a bunch of tests, and make sure that they never re-use a port number, they can grab the singleton instead of instantiating a new PortFinder in each test. Each call to getNextOpenPort will return successive port numbers, so each test will be guaranteed to have unique port numbers, and the tests won't clash with each other.