Skip to content

Commit 52bec80

Browse files
committed
fixing tests
1 parent bf8b2f5 commit 52bec80

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/indices.analyze/15_analyze.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,3 @@
8080
filter:
8181
type: hunspell
8282
locale: en_US
83-
84-
- match: { status: 400 }
85-
- match: { error.type: illegal_argument_exception }
86-
- match: { error.reason: "Can not build a custom analyzer" }

server/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void testDicWithNoAff() throws Exception {
6464
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
6565
.build();
6666

67-
IllegalStateException e = expectThrows(IllegalStateException.class, () -> {
67+
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> {
6868
final Environment environment = new Environment(settings, getDataPath("/indices/analyze/no_aff_conf_dir"));
6969
new HunspellService(settings, environment, emptyMap()).getDictionary("en_US");
7070
});
@@ -78,7 +78,7 @@ public void testDicWithTwoAffs() throws Exception {
7878
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
7979
.build();
8080

81-
IllegalStateException e = expectThrows(IllegalStateException.class, () -> {
81+
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> {
8282
final Environment environment = new Environment(settings, getDataPath("/indices/analyze/two_aff_conf_dir"));
8383
new HunspellService(settings, environment, emptyMap()).getDictionary("en_US");
8484
});

0 commit comments

Comments
 (0)