[tests] use ensure to close cluster instances in tests

adding a missing cluster.close and wrapping all of them in ensure clause