diff --git a/server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleTests.java b/server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleTests.java index d0c7a044149..d0f407958f8 100644 --- a/server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleTests.java @@ -50,7 +50,7 @@ public class DiscoveryNodeRoleTests extends ESTestCase { } })))); - assertThat(e, hasToString(containsString("Duplicate key foo "))); + assertThat(e, hasToString(containsString("Duplicate key"))); } public void testDiscoveryNodeSetPossibleRolesRejectsDuplicateRoleNameAbbreviations() { @@ -73,7 +73,7 @@ public class DiscoveryNodeRoleTests extends ESTestCase { } })))); - assertThat(e, hasToString(containsString("Duplicate key f "))); + assertThat(e, hasToString(containsString("Duplicate key"))); } }