Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Test failing randomly #835

Open
juhovuori opened this issue Jan 31, 2018 · 1 comment
Open

Test failing randomly #835

juhovuori opened this issue Jan 31, 2018 · 1 comment

Comments

@juhovuori
Copy link

  1. I cloned nakadi repository (commit 0e21025)
  2. I ran ./gradlew build, which eventually failed on a test:
org.zalando.nakadi.controller.EventTypeAuthorizationTest > whenPUTNotAuthorizedThen403 FAILED
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.zalando.nakadi.exceptions.runtime.AccessDeniedException
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
        at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:65)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:167)
        at org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134)
        at org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:155)
        at org.zalando.nakadi.controller.EventTypeControllerTestCase.putEventType(EventTypeControllerTestCase.java:164)
        at org.zalando.nakadi.controller.EventTypeControllerTestCase.putEventType(EventTypeControllerTestCase.java:158)
        at org.zalando.nakadi.controller.EventTypeAuthorizationTest.whenPUTNotAuthorizedThen403(EventTypeAuthorizationTest.java:48)

        Caused by:
        org.zalando.nakadi.exceptions.runtime.AccessDeniedException
            at org.zalando.nakadi.service.EventTypeService.update(EventTypeService.java:249)
            at org.zalando.nakadi.controller.EventTypeController.update(EventTypeController.java:147)
            at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
            at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
            at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
            at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
            at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
            ... 11 more

  1. Re-ran ./gradlew build and it finished succesfully.

I didn't dig any deeper into it, but seems like a race condition in the test.

@adyach
Copy link
Member

adyach commented Jan 31, 2018

@juhovuori thank you very much for reporting!
It looks unstable, It passes on travis https://travis-ci.org/zalando/nakadi though. We're aware of a couple of such tests, which has to be fixed. If you have time and will to contribute it would be very appreciated :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants