Skip to content

Commit 55dba6f

Browse files
committed
Fix JDK-version dependent exception message parsing
This commit fixes some JDK-version dependent exception message checking in the discovery node role tests.
1 parent 5bc3b7f commit 55dba6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected Setting<Boolean> roleSetting() {
5050
}
5151

5252
}))));
53-
assertThat(e, hasToString(containsString("Duplicate key foo ")));
53+
assertThat(e, hasToString(containsString("Duplicate key")));
5454
}
5555

5656
public void testDiscoveryNodeSetPossibleRolesRejectsDuplicateRoleNameAbbreviations() {
@@ -73,7 +73,7 @@ protected Setting<Boolean> roleSetting() {
7373
}
7474

7575
}))));
76-
assertThat(e, hasToString(containsString("Duplicate key f ")));
76+
assertThat(e, hasToString(containsString("Duplicate key")));
7777
}
7878

7979
}

0 commit comments

Comments
 (0)