Skip to content

Commit 816f12f

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 19909ed commit 816f12f

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
@@ -49,7 +49,7 @@ protected Setting<Boolean> roleSetting() {
4949
}
5050

5151
})));
52-
assertThat(e, hasToString(containsString("Duplicate key foo ")));
52+
assertThat(e, hasToString(containsString("Duplicate key")));
5353
}
5454

5555
public void testDiscoveryNodeSetPossibleRolesRejectsDuplicateRoleNameAbbreviations() {
@@ -72,7 +72,7 @@ protected Setting<Boolean> roleSetting() {
7272
}
7373

7474
})));
75-
assertThat(e, hasToString(containsString("Duplicate key f ")));
75+
assertThat(e, hasToString(containsString("Duplicate key")));
7676
}
7777

7878
}

0 commit comments

Comments
 (0)