test for closing underlying connection