java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Sometimes our tests fails with following exceptions: {code} 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) {code} I reproduced this problem in sample application. Complete application is available at https://github.com/maxcom/spring-test-bug.
    via by Maxim Valyanskiy,
  • Sometimes our tests fails with following exceptions: {code} 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) {code} I reproduced this problem in sample application. Complete application is available at https://github.com/maxcom/spring-test-bug.
    via by Maxim Valyanskiy,
  • Spring DeferredResult timeout
    via Stack Overflow by marknorkin
    ,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,