From 18141b8da08017afa9b64566becae879c13a1292 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 23 Jul 2013 00:10:27 +0200 Subject: [PATCH] Fix SimplePercolatorTests#testPercolateStatistics --- .../test/integration/percolator/SimplePercolatorTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/test/integration/percolator/SimplePercolatorTests.java b/src/test/java/org/elasticsearch/test/integration/percolator/SimplePercolatorTests.java index eb5c57ab432..5108c188a2f 100644 --- a/src/test/java/org/elasticsearch/test/integration/percolator/SimplePercolatorTests.java +++ b/src/test/java/org/elasticsearch/test/integration/percolator/SimplePercolatorTests.java @@ -535,8 +535,8 @@ public class SimplePercolatorTests extends AbstractSharedClusterTest { assertThat(indicesResponse.getTotal().getPercolate().getCount(), equalTo(10l)); assertThat(indicesResponse.getTotal().getPercolate().getCurrent(), equalTo(0l)); - nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet(); percolateCount = 0; + nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet(); for (NodeStats nodeStats : nodesResponse) { 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..."); long percolateSumTime = 0; + nodesResponse = client().admin().cluster().prepareNodesStats().execute().actionGet(); for (NodeStats nodeStats : nodesResponse) { percolateCount += nodeStats.getIndices().getPercolate().getCount(); percolateSumTime += nodeStats.getIndices().getPercolate().getTimeInMillis();