use lambdas
This commit is contained in:
parent
4f536945de
commit
f07853b56c
|
@ -152,29 +152,23 @@ public class MetaDataWriteDataNodesIT extends ESIntegTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertIndexDirectoryDeleted(final String nodeName, final String indexName) throws Exception {
|
protected void assertIndexDirectoryDeleted(final String nodeName, final String indexName) throws Exception {
|
||||||
assertBusy(new Runnable() {
|
assertBusy(() -> {
|
||||||
@Override
|
logger.info("checking if index directory exists...");
|
||||||
public void run() {
|
assertFalse("Expecting index directory of " + indexName + " to be deleted from node " + nodeName, indexDirectoryExists(nodeName, indexName));
|
||||||
logger.info("checking if index directory exists...");
|
}
|
||||||
assertFalse("Expecting index directory of " + indexName + " to be deleted from node " + nodeName, indexDirectoryExists(nodeName, indexName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertIndexInMetaState(final String nodeName, final String indexName) throws Exception {
|
protected void assertIndexInMetaState(final String nodeName, final String indexName) throws Exception {
|
||||||
assertBusy(new Runnable() {
|
assertBusy(() -> {
|
||||||
@Override
|
logger.info("checking if meta state exists...");
|
||||||
public void run() {
|
try {
|
||||||
logger.info("checking if meta state exists...");
|
assertTrue("Expecting meta state of index " + indexName + " to be on node " + nodeName, getIndicesMetaDataOnNode(nodeName).containsKey(indexName));
|
||||||
try {
|
} catch (Throwable t) {
|
||||||
assertTrue("Expecting meta state of index " + indexName + " to be on node " + nodeName, getIndicesMetaDataOnNode(nodeName).containsKey(indexName));
|
logger.info("failed to load meta state", t);
|
||||||
} catch (Throwable t) {
|
fail("could not load meta state");
|
||||||
logger.info("failed to load meta state", t);
|
}
|
||||||
fail("could not load meta state");
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue