diff --git a/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java b/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java index 7372b47d57b..349631588bd 100644 --- a/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java +++ b/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java @@ -71,8 +71,7 @@ public class NettyPipeliningDisabledIntegrationTest extends ElasticsearchIntegra * checks if all responses are there, but also tests that they are out of order because pipelining is disabled */ private void assertResponsesOutOfOrder(List opaqueIds) { - String message = String.format(Locale.ROOT, "Expected returned http message ids to be out of order: %s", opaqueIds); - assertThat(opaqueIds, hasItems("0", "1", "2", "3", "4", "5", "6")); - assertThat(message, opaqueIds, not(contains("0", "1", "2", "3", "4", "5", "6"))); + String message = String.format(Locale.ROOT, "Expected returned http message ids to be in any order of: %s", opaqueIds); + assertThat(message, opaqueIds, containsInAnyOrder("0", "1", "2", "3", "4", "5", "6")); } }