-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issue
Description
Maxim Valyanskiy opened SPR-11536 and commented
Sometimes our tests fails with following exceptions:
java.lang.IllegalStateException: Gave up waiting on async result from handler [public org.springframework.web.context.request.async.DeferredResult<java.lang.String> SimpleController.handle()] to complete
at org.springframework.test.web.servlet.DefaultMvcResult.getAsyncResult(DefaultMvcResult.java:133)
at org.springframework.test.web.servlet.DefaultMvcResult.getAsyncResult(DefaultMvcResult.java:121)
at org.springframework.test.web.servlet.result.RequestResultMatchers$3.match(RequestResultMatchers.java:94)
at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:149)
at SimpleControllerTest.testSimple(SimpleControllerTest.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
I reproduced this problem in sample application. Complete application is available at https://github.com/maxcom/spring-test-bug.
Affects: 4.0.2
Issue Links:
- Spring MVC Test can fail to obtain async result due to timing issue [SPR-11516] #16141 Spring MVC Test can fail to obtain async result due to timing issue ("duplicates")
1 votes, 3 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issue