From b580677412a81386ac3bf286752fb2f49aea5003 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 7 Jun 2019 17:46:12 -0400 Subject: [PATCH] Fix put mapping request validators random test This commit fixes a test bug in the request validators random test. In particular, an assertion was not properly nested in a guard that would ensure that was at least one failure. Relates #43000 --- .../mapping/put/TransportPutMappingRequestValidatorsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingRequestValidatorsTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingRequestValidatorsTests.java index d65ecadd9b7..1b333ce0288 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingRequestValidatorsTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingRequestValidatorsTests.java @@ -84,8 +84,8 @@ public class TransportPutMappingRequestValidatorsTests extends ESTestCase { assertNull(e); } else { assertNotNull(e); + assertThat(e.getSuppressed(), Matchers.arrayWithSize(numberOfFailures - 1)); } - assertThat(e.getSuppressed(), Matchers.arrayWithSize(numberOfFailures - 1)); } }