Skip to content

Commit 03c3051

Browse files
committed
Fix failing tests
1 parent 28a5c30 commit 03c3051

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public void noHandler() throws Exception {
8888
StepVerifier.create(publisher)
8989
.consumeErrorWith(error -> {
9090
assertThat(error, instanceOf(ResponseStatusException.class));
91-
assertThat(error.getMessage(), is("Response status 404 with reason \"No matching handler\""));
91+
assertThat(error.getMessage(),
92+
is("Response status 404 NOT_FOUND with reason \"No matching handler\""));
9293
})
9394
.verify();
9495
}

spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void resolverThrowsException() throws Exception {
176176
fail("Expected UnsupportedMediaTypeStatusException");
177177
}
178178
catch (UnsupportedMediaTypeStatusException ex) {
179-
assertThat(ex.getMessage(), is("Response status 415 with reason \"boo\""));
179+
assertThat(ex.getMessage(), is("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason \"boo\""));
180180
}
181181
}
182182

spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public void getHandlerTestInvalidContentType() {
170170
Mono<Object> mono = this.handlerMapping.getHandler(exchange);
171171

172172
assertError(mono, UnsupportedMediaTypeStatusException.class,
173-
ex -> assertEquals("Response status 415 with reason \"Invalid mime type \"bogus\": " +
174-
"does not contain '/'\"", ex.getMessage()));
173+
ex -> assertEquals("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason " +
174+
"\"Invalid mime type \"bogus\": does not contain '/'\"", ex.getMessage()));
175175
}
176176

177177
@Test // SPR-8462

0 commit comments

Comments
 (0)