Work around MockMvc bug (SPR-13079) that has only been fixed in 4.2

See gh-4098
pull/4212/head
Andy Wilkinson 9 years ago
parent b8b4ea489e
commit 6387f36efa

@ -228,6 +228,8 @@ public class MetricFilterAutoConfigurationTests {
.andExpect(request().attribute(attributeName, is(notNullValue())))
.andReturn();
latch.countDown();
// Work around SPR-13079 which has not been fixed in 4.1.x
result.getAsyncResult();
mvc.perform(asyncDispatch(result)).andExpect(status().isCreated())
.andExpect(request().attribute(attributeName, is(nullValue())));
verify(context.getBean(CounterService.class)).increment("status.201.create");

Loading…
Cancel
Save