Only initiate connection when not testing