arquillian / arquillian-governor

Arquillian Governor
Apache License 2.0
10 stars 11 forks source link

Governor github/Jira closes issues even when test fails #17

Closed rmpestano closed 8 years ago

rmpestano commented 8 years ago

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: https://github.com/arquillian/arquillian-governor/pull/16#issuecomment-166590210

rmpestano commented 8 years ago

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 8 years ago

Alright, observing 'AfterTestLifecycleEvent' event makes it call twice and with correct TestStatus in last call.