Handle open connections when creating the test database