Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-5552

Mock the request for News in Studio tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.21.0
    • Fix Version/s: 3.21.0
    • Component/s: QA / CI / Tests
    • Tags:
    • Team:
      NOS
    • Sprint:
      NOS 11.1.19 - 2019-10 1

      Description

      The nuxeo-studio-test logs are being polluted with errors made to the Connect endpoint to retrieve the news. We should mock the request to retrieve an empty list and avoid such errors.

      Error example:

      13:52:18 12:52:18,246 WARN  [Log4JLogger] /nuxeo/site/nos/news
      13:52:18 java.lang.IllegalArgumentException: Cannot process this request : /nuxeo/site/nos/news
      13:52:18 	at com.nuxeo.studio.test.connect.ConnectMockServlet.doGet(ConnectMockServlet.java:94)
      13:52:18 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      13:52:18 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
      13:52:18 	at com.nuxeo.studio.core.auth.StudioWebFilter.run(StudioWebFilter.java:65)
      13:52:18 	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      13:52:18 	at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:48)
      13:52:18 	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      13:52:18 	at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:50)
      13:52:18 	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      13:52:18 	at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:92)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      13:52:18 	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:608)
      13:52:18 	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:408)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      13:52:18 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      13:52:18 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      13:52:18 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      13:52:18 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      13:52:18 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      13:52:18 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      13:52:18 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      13:52:18 	at org.mortbay.jetty.Server.handle(Server.java:326)
      13:52:18 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      13:52:18 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      13:52:18 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      13:52:18 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      13:52:18 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      13:52:18 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      13:52:18 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
      13:52:33 12:52:33,779 WARN  [UserManagerImpl] Trying to authenticate against null username or password
      

        Attachments

          Activity

            People

            • Assignee:
              rdias Ricardo Dias
              Reporter:
              rdias Ricardo Dias
              Participants:
              Reviewers:
              Yannis Julienne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m