Commit 6387f36e authored by Andy Wilkinson's avatar Andy Wilkinson

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

See gh-4098
parent b8b4ea48
...@@ -228,6 +228,8 @@ public class MetricFilterAutoConfigurationTests { ...@@ -228,6 +228,8 @@ public class MetricFilterAutoConfigurationTests {
.andExpect(request().attribute(attributeName, is(notNullValue()))) .andExpect(request().attribute(attributeName, is(notNullValue())))
.andReturn(); .andReturn();
latch.countDown(); latch.countDown();
// Work around SPR-13079 which has not been fixed in 4.1.x
result.getAsyncResult();
mvc.perform(asyncDispatch(result)).andExpect(status().isCreated()) mvc.perform(asyncDispatch(result)).andExpect(status().isCreated())
.andExpect(request().attribute(attributeName, is(nullValue()))); .andExpect(request().attribute(attributeName, is(nullValue())));
verify(context.getBean(CounterService.class)).increment("status.201.create"); verify(context.getBean(CounterService.class)).increment("status.201.create");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment