improve logging on before/after shared cluster tests
This commit is contained in:
parent
6a04c16932
commit
db8f2be8bc
|
@ -103,11 +103,12 @@ public abstract class AbstractSharedClusterTest extends ElasticsearchTestCase {
|
||||||
cluster.beforeTest(getRandom());
|
cluster.beforeTest(getRandom());
|
||||||
wipeIndices();
|
wipeIndices();
|
||||||
wipeTemplates();
|
wipeTemplates();
|
||||||
|
logger.info("[{}#{}]: before test", getTestClass().getSimpleName(), getTestName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void after() throws IOException {
|
public void after() throws IOException {
|
||||||
logger.info("Cleaning up after test.");
|
logger.info("[{}#{}]: cleaning up after test", getTestClass().getSimpleName(), getTestName());
|
||||||
MetaData metaData = client().admin().cluster().prepareState().execute().actionGet().getState().getMetaData();
|
MetaData metaData = client().admin().cluster().prepareState().execute().actionGet().getState().getMetaData();
|
||||||
assertThat("test leaves persistent cluster metadata behind: " + metaData.persistentSettings().getAsMap(), metaData
|
assertThat("test leaves persistent cluster metadata behind: " + metaData.persistentSettings().getAsMap(), metaData
|
||||||
.persistentSettings().getAsMap().size(), equalTo(0));
|
.persistentSettings().getAsMap().size(), equalTo(0));
|
||||||
|
@ -116,6 +117,7 @@ public abstract class AbstractSharedClusterTest extends ElasticsearchTestCase {
|
||||||
wipeIndices(); // wipe after to make sure we fail in the test that didn't ack the delete
|
wipeIndices(); // wipe after to make sure we fail in the test that didn't ack the delete
|
||||||
wipeTemplates();
|
wipeTemplates();
|
||||||
ensureAllFilesClosed();
|
ensureAllFilesClosed();
|
||||||
|
logger.info("[{}#{}]: cleaned up after test", getTestClass().getSimpleName(), getTestName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TestCluster cluster() {
|
public static TestCluster cluster() {
|
||||||
|
|
Loading…
Reference in New Issue