Governor github/Jira closes issues even when test fails
Closed this issue · 2 comments
rmpestano commented
Given the following failing test:
@RunWith(Arquillian.class)
public class ITGitHubGovernorTest {
@ArquillianResource
GitHubClient gitHubClient; //is not null
@Test
@GitHub(value = "1", force = true)
public void closeIssue() {
assertThat(gitHubClient, nullValue());
}
}
github issue will be closed where it should remain open cause the test is failing. This is because after event is called two times, see here, and the first time the test status is always == PASSED.
more details here: #16 (comment)
rmpestano commented
well its not calling the After event multiple times, its calling only once but with TestStatus == PASSED even when the test fails...I will investigate
rmpestano commented
Alright, observing 'AfterTestLifecycleEvent' event makes it call twice and with correct TestStatus in last call.