#8222 TestForumMessageHandling fails occasionally

unreleased
open
nobody
None
General
nobody
2018-08-02
2018-08-02
No

The jenkins build sometimes fails with this:

======================================================================
ERROR: forgediscussion.tests.functional.test_forum.TestForumMessageHandling.test_posts
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/nose/case.py",> line 197, in runTest
    self.test(*self.arg)
  File "<https://builds.apache.org/job/Allura/ws/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py",> line 248, in test_posts
    r = self.app.get(url, params=dict(version='1'))
  File "<https://builds.apache.org/job/Allura/ws/AlluraTest/alluratest/validation.py",> line 322, in get
    resp = super(ValidatingTestApp, self).get(*args, **kw)
  File "<https://builds.apache.org/job/Allura/ws/AlluraTest/alluratest/validation.py",> line 269, in get
    return super(PostParamCheckingTestApp, self).get(*args, **kwargs)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webtest/app.py",> line 756, in get
    expect_errors=expect_errors)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webtest/app.py",> line 1099, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webob/request.py",> line 1049, in get_response
    application, catch_exc_info=True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webob/request.py",> line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webtest/lint.py",> line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/middleware.py",> line 150, in __call__
    self.app, environ, catch_exc_info=True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/util.py",> line 51, in call_wsgi_application
    output.extend(app_iter)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/paste/registry.py",> line 409, in streaming_iter
    for item in self.application(environ, start_response):
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/ming/odm/middleware.py",> line 29, in __call__
    result = self.app(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/custom_middleware.py",> line 60, in __call__
    return self.app(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/ew/middleware.py",> line 65, in __call__
    result = self.app(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/custom_middleware.py",> line 260, in __call__
    return resp(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/config/middleware.py",> line 207, in AlluraGlobalsMiddleware
    return app(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/custom_middleware.py",> line 214, in __call__
    return self._app(environ, session_start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/timermiddleware/__init__.py",> line 202, in __call__
    resp = req.get_response(self.app)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webob/request.py",> line 1053, in get_response
    application, catch_exc_info=False)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/webob/request.py",> line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/custom_middleware.py",> line 153, in __call__
    self.app, environ, catch_exc_info=True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/util.py",> line 48, in call_wsgi_application
    app_iter = application(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/custom_middleware.py",> line 402, in __call__
    return self.app(environ, remember_login_start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/beaker/middleware.py",> line 155, in __call__
    return self.wrap_app(environ, session_start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/routes/middleware.py",> line 131, in __call__
    response = self.app(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/wsgiapp.py",> line 107, in __call__
    response = self.dispatch(controller, environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/wsgiapp.py",> line 312, in dispatch
    return controller(environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/controllers/basetest_project_root.py",> line 143, in __call__
    return WsgiDispatchController.__call__(self, environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/base.py",> line 49, in __call__
    environ, start_response)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/controllers/core.py",> line 211, in __call__
    response = self._dispatch_call()
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/controllers/core.py",> line 162, in _dispatch_call
    response = self._inspect_call(func)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/pylons/controllers/core.py",> line 105, in _inspect_call
    result = self._perform_call(func, args)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/controllers/dispatcher.py",> line 258, in _perform_call
    r = self._call(func, params, remainder=remainder)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/controllers/decoratedcontroller.py",> line 142, in _call
    response = self._render_response(controller, output)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/controllers/decoratedcontroller.py",> line 331, in _render_response
    **render_params)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/render.py",> line 188, in render
    kwargs['result'] = render_function(template_name, tg_vars, **kwargs)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/render.py",> line 470, in render_jinja
    cache_key=cache_key, cache_type=cache_type, cache_expire=cache_expire)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/render.py",> line 253, in cached_template
    return render_func()
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/tg/render.py",> line 467, in render_template
    return literal(template.render(**globs))
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/jinja2/environment.py",> line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/jinja2/environment.py",> line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/templates/discussion/post.html",> line 19, in top-level template code
    {% extends g.theme.master %}
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/templates/jinja_master/master.html",> line 111, in top-level template code
    {% block content_base %}
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/templates/jinja_master/master.html",> line 137, in block "content_base"
    {% block content %}{% endblock %}
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/templates/discussion/post.html",> line 32, in block "content"
    <li>{{c.post.display(value=post)}}</li>
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/ew/widget.py",> line 45, in display
    return self.template(context)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/ew/render.py",> line 32, in __call__
    return self.engine.render(self.template, context)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/config/app_cfg.py",> line 133, in render
    text = template.render(**context)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/jinja2/environment.py",> line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/jinja2/environment.py",> line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/templates/widgets/post_widget.html",> line 81, in top-level template code
    {{g.markdown.cached_convert(value, 'text')|safe}}&nbsp;
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/app_globals.py",> line 137, in cached_convert
    with utils.skip_mod_date(artifact.__class__), \
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "<https://builds.apache.org/job/Allura/ws/Allura/allura/lib/utils.py",> line 699, in skip_mod_date
    skip_mod_date = getattr(session(model_cls)._get(), 'skip_mod_date', False)
  File "<https://builds.apache.org/job/Allura/ws/.allura-venv/local/lib/python2.7/site-packages/ming/odm/base.py",> line 10, in session
    return v.query.mapper.session
AttributeError: type object 'Object' has no attribute 'query'

Discussion


Log in to post a comment.