Remove unnecessary use of return value for assertBusy

Original commit: elastic/x-pack-elasticsearch@79fd5fc5e6
This commit is contained in:
Ryan Ernst 2016-05-23 16:16:31 -07:00
parent 8e1a9603e3
commit 045b255a05
1 changed files with 3 additions and 4 deletions

View File

@ -161,7 +161,7 @@ public abstract class AbstractCollectorTestCase extends MarvelIntegTestCase {
public void run() {
for (String nodeId : internalCluster().getNodeNames()) {
try {
assertTrue(waitForNoBlocksOnNode(nodeId));
waitForNoBlocksOnNode(nodeId);
} catch (Exception e) {
fail("failed to wait for no blocks on node [" + nodeId + "]: " + e.getMessage());
}
@ -170,13 +170,12 @@ public abstract class AbstractCollectorTestCase extends MarvelIntegTestCase {
});
}
public boolean waitForNoBlocksOnNode(final String nodeId) throws Exception {
return assertBusy(() -> {
public void waitForNoBlocksOnNode(final String nodeId) throws Exception {
assertBusy(() -> {
ClusterBlocks clusterBlocks =
client(nodeId).admin().cluster().prepareState().setLocal(true).execute().actionGet().getState().blocks();
assertTrue(clusterBlocks.global().isEmpty());
assertTrue(clusterBlocks.indices().values().isEmpty());
return true;
}, 30L, TimeUnit.SECONDS);
}