Bug 1033402 - Part 2: unit test for the waitForSocket.