create a test connection function with a shorter timeout