From 5488bab003aa1afc05db44a2e22f8bde5e2aa3e5 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 2 Dec 2013 14:50:00 +0100 Subject: [PATCH] Use EA#assertMatchCount() over just checking the match count. --- .../java/org/elasticsearch/percolator/PercolatorTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java index 5c1e0aceb3e..2cf55ff2248 100644 --- a/src/test/java/org/elasticsearch/percolator/PercolatorTests.java +++ b/src/test/java/org/elasticsearch/percolator/PercolatorTests.java @@ -558,7 +558,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { .setIndices("test").setDocumentType("type") .setSource(jsonBuilder().startObject().startObject("doc").field("field", "val").endObject().endObject()) .execute().actionGet(); - assertThat(response.getMatches(), arrayWithSize(1)); + assertMatchCount(response, 1l); assertThat(convertFromTextArray(response.getMatches(), "test"), arrayContaining("1")); IndicesStatsResponse indicesResponse = client().admin().indices().prepareStats("test").execute().actionGet(); @@ -579,6 +579,7 @@ public class PercolatorTests extends ElasticsearchIntegrationTest { .setIndices("test").setDocumentType("type") .setSource(jsonBuilder().startObject().startObject("doc").field("field", "val").endObject().endObject()) .execute().actionGet(); + assertMatchCount(response, 1l); assertThat(response.getMatches(), arrayWithSize(1)); assertThat(convertFromTextArray(response.getMatches(), "test"), arrayContaining("1"));