Use 127.0.0.1 instead of localhost to ensure tests are reproducible.