Add testcase for connection leaks fixed by previous commit

See #1708