Fix unclosed transactions in tests, re-enable proper shutdown cycle.