Skip to content

Commit 7cc132b

Browse files
committed
Merge pull request #22836 from izeye
* pr/22836: Add missing fail() calls in MockRestServiceServerTests
2 parents ad497c2 + 33ac14f commit 7cc132b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-test/src/test/java/org/springframework/test/web/client/MockRestServiceServerTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public void followUpRequestAfterFailure() {
126126

127127
try {
128128
this.restTemplate.getForEntity("/some-service/some-endpoint", String.class);
129+
fail("Expected exception to be thrown.");
129130
}
130131
catch (Exception ex) {
131132
this.restTemplate.postForEntity("/reporting-service/report-error", ex.toString(), String.class);
@@ -142,6 +143,7 @@ public void verifyShouldFailIfRequestsFailed() {
142143
this.restTemplate.postForEntity("/remoteurl", null, String.class);
143144
try {
144145
this.restTemplate.postForEntity("/remoteurl", null, String.class);
146+
fail("Expected error to be thrown.");
145147
}
146148
catch (AssertionError error) {
147149
assertThat(error.getMessage()).startsWith("No further requests expected");

0 commit comments

Comments
 (0)