{"action":"created","issue":{"url":"https://api.github.com/repos/junit-team/junit5/issues/1305","repository_url":"https://api.github.com/repos/junit-team/junit5","labels_url":"https://api.github.com/repos/junit-team/junit5/issues/1305/labels{/name}","comments_url":"https://api.github.com/repos/junit-team/junit5/issues/1305/comments","events_url":"https://api.github.com/repos/junit-team/junit5/issues/1305/events","html_url":"https://github.com/junit-team/junit5/issues/1305","id":299711392,"number":1305,"title":"Bug: AfterAllCallback extension hides container failure","user":{"login":"jorn86","id":1822951,"avatar_url":"https://avatars0.githubusercontent.com/u/1822951?v=4","gravatar_id":"","url":"https://api.github.com/users/jorn86","html_url":"https://github.com/jorn86","followers_url":"https://api.github.com/users/jorn86/followers","following_url":"https://api.github.com/users/jorn86/following{/other_user}","gists_url":"https://api.github.com/users/jorn86/gists{/gist_id}","starred_url":"https://api.github.com/users/jorn86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorn86/subscriptions","organizations_url":"https://api.github.com/users/jorn86/orgs","repos_url":"https://api.github.com/users/jorn86/repos","events_url":"https://api.github.com/users/jorn86/events{/privacy}","received_events_url":"https://api.github.com/users/jorn86/received_events","type":"User","site_admin":false},"labels":[{"id":420911923,"url":"https://api.github.com/repos/junit-team/junit5/labels/component:%20Jupiter","name":"component: Jupiter","color":"11ee99","default":false},{"id":310903254,"url":"https://api.github.com/repos/junit-team/junit5/labels/theme:%20reporting","name":"theme: reporting","color":"bfdadc","default":false},{"id":165165178,"url":"https://api.github.com/repos/junit-team/junit5/labels/type:%20bug","name":"type: bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"marcphilipp","id":214207,"avatar_url":"https://avatars2.githubusercontent.com/u/214207?v=4","gravatar_id":"","url":"https://api.github.com/users/marcphilipp","html_url":"https://github.com/marcphilipp","followers_url":"https://api.github.com/users/marcphilipp/followers","following_url":"https://api.github.com/users/marcphilipp/following{/other_user}","gists_url":"https://api.github.com/users/marcphilipp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcphilipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcphilipp/subscriptions","organizations_url":"https://api.github.com/users/marcphilipp/orgs","repos_url":"https://api.github.com/users/marcphilipp/repos","events_url":"https://api.github.com/users/marcphilipp/events{/privacy}","received_events_url":"https://api.github.com/users/marcphilipp/received_events","type":"User","site_admin":false},"assignees":[{"login":"marcphilipp","id":214207,"avatar_url":"https://avatars2.githubusercontent.com/u/214207?v=4","gravatar_id":"","url":"https://api.github.com/users/marcphilipp","html_url":"https://github.com/marcphilipp","followers_url":"https://api.github.com/users/marcphilipp/followers","following_url":"https://api.github.com/users/marcphilipp/following{/other_user}","gists_url":"https://api.github.com/users/marcphilipp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcphilipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcphilipp/subscriptions","organizations_url":"https://api.github.com/users/marcphilipp/orgs","repos_url":"https://api.github.com/users/marcphilipp/repos","events_url":"https://api.github.com/users/marcphilipp/events{/privacy}","received_events_url":"https://api.github.com/users/marcphilipp/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/junit-team/junit5/milestones/15","html_url":"https://github.com/junit-team/junit5/milestone/15","labels_url":"https://api.github.com/repos/junit-team/junit5/milestones/15/labels","id":2785279,"number":15,"title":"5.2 Backlog","description":"Backlog of issues that are being considered for inclusion in 5.2.\r\n\r\nPotential Themes: test ordering, scenario tests, enhanced dynamic tests, test execution in user-defined thread, parallel test execution.","creator":{"login":"marcphilipp","id":214207,"avatar_url":"https://avatars2.githubusercontent.com/u/214207?v=4","gravatar_id":"","url":"https://api.github.com/users/marcphilipp","html_url":"https://github.com/marcphilipp","followers_url":"https://api.github.com/users/marcphilipp/followers","following_url":"https://api.github.com/users/marcphilipp/following{/other_user}","gists_url":"https://api.github.com/users/marcphilipp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcphilipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcphilipp/subscriptions","organizations_url":"https://api.github.com/users/marcphilipp/orgs","repos_url":"https://api.github.com/users/marcphilipp/repos","events_url":"https://api.github.com/users/marcphilipp/events{/privacy}","received_events_url":"https://api.github.com/users/marcphilipp/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":0,"state":"open","created_at":"2017-09-22T13:42:04Z","updated_at":"2018-02-25T09:12:23Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-02-23T13:29:01Z","updated_at":"2018-02-25T14:49:08Z","closed_at":null,"author_association":"NONE","body":"Consider this test code:\r\n\r\n```\r\n@ExtendWith(ThrowingExtension.class)\r\nclass ReproTest {\r\n    ReproTest() { this(\"\"); }\r\n    ReproTest(String s) { }\r\n\r\n    @Test void test() { }\r\n}\r\nclass ThrowingExtension implements AfterAllCallback {\r\n    @Override\r\n    public void afterAll(ExtensionContext context) {\r\n        throw new IllegalStateException(\"Callback fails\");\r\n    }\r\n}\r\n```\r\n\r\nThis test is invalid, because it has two constructors. And JUnit will usually tell you exactly that. Unfortunately, the `AfterAllCallback` will still be executed in this case, and will hide the actual informative message.\r\n\r\nIf I have the thrown exception in an `@AfterAll` method in the test class itself, this will work correctly and give the `PreconditionViolationException` I'd expect."},"comment":{"url":"https://api.github.com/repos/junit-team/junit5/issues/comments/368315273","html_url":"https://github.com/junit-team/junit5/issues/1305#issuecomment-368315273","issue_url":"https://api.github.com/repos/junit-team/junit5/issues/1305","id":368315273,"user":{"login":"geo-m","id":25904283,"avatar_url":"https://avatars1.githubusercontent.com/u/25904283?v=4","gravatar_id":"","url":"https://api.github.com/users/geo-m","html_url":"https://github.com/geo-m","followers_url":"https://api.github.com/users/geo-m/followers","following_url":"https://api.github.com/users/geo-m/following{/other_user}","gists_url":"https://api.github.com/users/geo-m/gists{/gist_id}","starred_url":"https://api.github.com/users/geo-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geo-m/subscriptions","organizations_url":"https://api.github.com/users/geo-m/orgs","repos_url":"https://api.github.com/users/geo-m/repos","events_url":"https://api.github.com/users/geo-m/events{/privacy}","received_events_url":"https://api.github.com/users/geo-m/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T14:49:08Z","updated_at":"2018-02-25T14:49:08Z","author_association":"NONE","body":"Under default licefycle the precondition single constructor exception is thrown during the preparation phase of the child nodes of the TestClassDescriptor (methods etc), where control immediately returns.\r\n\r\nUsing PER_CLASS, the exception is thrown during node.before in the try - catch block of HierarchicalTestExecutor#execute(line 80), enters finally block, where the callback exception masks the original exception as the fail cause. This is my first involvement with the project and if you decide on a plan for this i would like to try my luck, if this would be ok with you."}}
{"actor":{"display_login":"geo-m"}}