make test use an available port instead of a hard-coded one