add the possibility of passing in timeout setting to wait_for_server.