aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/test/samples/FailingTestAndBothAftersTest.java
blob: 54b36de177ecc0a44ea23ea36910d35fd98baa3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.test.samples;

import com.yahoo.vespa.testrunner.Expect;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

@Expect(failed = 1, status = 5)
public class FailingTestAndBothAftersTest {

    @AfterAll
    static void fail() { throw new RuntimeException(); }

    @AfterEach
    void moreFail() { throw new RuntimeException(); }

    @Test
    void test() { Assertions.fail(); }

}