Skip to content

Commit 6387f36

Browse files
committed
Work around MockMvc bug (SPR-13079) that has only been fixed in 4.2
See gh-4098
1 parent b8b4ea4 commit 6387f36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/MetricFilterAutoConfigurationTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ public void correctlyRecordsMetricsForDeferredResultResponse() throws Exception
228228
.andExpect(request().attribute(attributeName, is(notNullValue())))
229229
.andReturn();
230230
latch.countDown();
231+
// Work around SPR-13079 which has not been fixed in 4.1.x
232+
result.getAsyncResult();
231233
mvc.perform(asyncDispatch(result)).andExpect(status().isCreated())
232234
.andExpect(request().attribute(attributeName, is(nullValue())));
233235
verify(context.getBean(CounterService.class)).increment("status.201.create");

0 commit comments

Comments
 (0)