Fix SimplePercolatorTests#testPercolateStatistics

This commit is contained in:
Martijn van Groningen 2013-07-23 00:10:27 +02:00
parent 4930b93c26
commit 18141b8da0
1 changed files with 2 additions and 1 deletions

View File

@ -535,8 +535,8 @@ public class SimplePercolatorTests extends AbstractSharedClusterTest {
assertThat(indicesResponse.getTotal().getPercolate().getCount(), equalTo(10l)); assertThat(indicesResponse.getTotal().getPercolate().getCount(), equalTo(10l));
assertThat(indicesResponse.getTotal().getPercolate().getCurrent(), equalTo(0l)); assertThat(indicesResponse.getTotal().getPercolate().getCurrent(), equalTo(0l));
nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet();
percolateCount = 0; percolateCount = 0;
nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet();
for (NodeStats nodeStats : nodesResponse) { for (NodeStats nodeStats : nodesResponse) {
percolateCount += nodeStats.getIndices().getPercolate().getCount(); percolateCount += nodeStats.getIndices().getPercolate().getCount();
} }
@ -562,6 +562,7 @@ public class SimplePercolatorTests extends AbstractSharedClusterTest {
assertTrue(moreThanOneMs, "Something is off, we should have spent at least 1ms on percolating..."); assertTrue(moreThanOneMs, "Something is off, we should have spent at least 1ms on percolating...");
long percolateSumTime = 0; long percolateSumTime = 0;
nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet();
for (NodeStats nodeStats : nodesResponse) { for (NodeStats nodeStats : nodesResponse) {
percolateCount += nodeStats.getIndices().getPercolate().getCount(); percolateCount += nodeStats.getIndices().getPercolate().getCount();
percolateSumTime += nodeStats.getIndices().getPercolate().getTimeInMillis(); percolateSumTime += nodeStats.getIndices().getPercolate().getTimeInMillis();