Close session when test fails