Skip to content

CrateTestCluster is not terminated when a unit test fails  #73

@mkleen

Description

@mkleen
import io.crate.testing.CrateTestCluster;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.is;

public class ShutdownTest {

    private static CrateTestCluster testCluster;

    @BeforeClass
    public static void setUpClusterAndAgent() throws Throwable {
        testCluster = CrateTestCluster.fromURL("https://cdn.crate.io/downloads/releases/nightly/crate-latest.tar.gz")
                .keepWorkingDir(false)
                .build();
        testCluster.before();
    }

    @AfterClass
    public static void tearDown() {
        testCluster.after();
    }

    @Test
    public void test() {
        assertThat(true, is(false));
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions