Small cleanup.
Use localhost and dynamic port in test.