From f07853b56c3d07a9563da07019ccdfc337344be6 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 14 Oct 2015 11:36:02 +0200 Subject: [PATCH] use lambdas --- .../gateway/MetaDataWriteDataNodesIT.java | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java index 53b1e7311ed..9a2c2830076 100644 --- a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java @@ -152,29 +152,23 @@ public class MetaDataWriteDataNodesIT extends ESIntegTestCase { } protected void assertIndexDirectoryDeleted(final String nodeName, final String indexName) throws Exception { - assertBusy(new Runnable() { - @Override - public void run() { - logger.info("checking if index directory exists..."); - assertFalse("Expecting index directory of " + indexName + " to be deleted from node " + nodeName, indexDirectoryExists(nodeName, indexName)); - } - } + assertBusy(() -> { + 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 { - assertBusy(new Runnable() { - @Override - public void run() { - logger.info("checking if meta state exists..."); - try { - assertTrue("Expecting meta state of index " + indexName + " to be on node " + nodeName, getIndicesMetaDataOnNode(nodeName).containsKey(indexName)); - } catch (Throwable t) { - logger.info("failed to load meta state", t); - fail("could not load meta state"); - } - } - } + assertBusy(() -> { + logger.info("checking if meta state exists..."); + try { + assertTrue("Expecting meta state of index " + indexName + " to be on node " + nodeName, getIndicesMetaDataOnNode(nodeName).containsKey(indexName)); + } catch (Throwable t) { + logger.info("failed to load meta state", t); + fail("could not load meta state"); + } + } ); }