Test connect with connection exception