Skip to content

Commit 511f1c7

Browse files
committed
Add context to assert
1 parent c8d8d51 commit 511f1c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/external-modules/multi-project/src/javaRestTest/java/org/elasticsearch/action/admin/indices/SearchMultiProjectIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ public void testRequestCacheIsNotSharedAcrossProjects() throws IOException {
183183
// That is, an aggregation with size:0
184184
ObjectPath response = search(projectId1, indexName, query);
185185
String context = "In search response: " + response;
186-
assertThat(response.evaluateArraySize("aggregations.proj.buckets"), equalTo(1));
187-
assertThat(response.evaluate("aggregations.proj.buckets.0.key"), equalTo(1));
188-
assertThat(response.evaluate("aggregations.proj.buckets.0.doc_count"), equalTo(1));
186+
assertThat(context, response.evaluateArraySize("aggregations.proj.buckets"), equalTo(1));
187+
assertThat(context, response.evaluate("aggregations.proj.buckets.0.key"), equalTo(1));
188+
assertThat(context, response.evaluate("aggregations.proj.buckets.0.doc_count"), equalTo(1));
189189

190190
final long agg1CacheSize = getRequestCacheUsage();
191191
assertThat("Expected aggregation result to be stored in shard request cache", agg1CacheSize, greaterThan(initialCacheSize));

0 commit comments

Comments
 (0)