Added explicit test to ensure connection is open