close connections test code