Intermittant Unit Test Failure in Certificate Resources

Bug #1504492 reported by Dave McCowan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
Dave McCowan

Bug Description

Sometimes barbican/tests/tasks/test_certificate_resources.py unit test cases fail with the following error reported.

FAIL: barbican.tests.tasks.test_certificate_resources.WhenCreatingSubordinateCAs.test_should_raise_when_delete_pref_subca_with_other_project_ca

tags: worker-12

----------------------------------------------------------------------

Empty attachments:

  pythonlogging:''

  stderr

  stdout

Traceback (most recent call last):

  File "barbican/tests/tasks/test_certificate_resources.py", line 841, in setUp

    self.project = res.get_or_create_project('12345')

  File "barbican/common/resources.py", line 43, in get_or_create_project

    suppress_exception=True)

  File "barbican/model/repositories.py", line 564, in find_by_external_project_id

    session = self.get_session(session)

  File "barbican/model/repositories.py", line 332, in get_session

    return session or get_session()

  File "barbican/model/repositories.py", line 153, in get_session

    return _SESSION_FACTORY()

TypeError: 'NoneType' object is not callable

Changed in barbican:
status: New → In Progress
assignee: nobody → Dave McCowan (dave-mccowan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/233006

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/233006
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=82ca961a0bf5ed80bda8176869438d51a7f95581
Submitter: Jenkins
Branch: master

commit 82ca961a0bf5ed80bda8176869438d51a7f95581
Author: Dave McCowan <email address hidden>
Date: Fri Oct 9 06:53:47 2015 -0400

    Fix Intermittant Unit Test Failure

    Ensure that the in memory DB used for unit tests is setup before and
    cleaned up after running the certificate resources unit tests that
    access database routines.

    Change-Id: Ieff5cfa8a1ea164377105acf5c226c1012b5aa96
    Closes-bug: #1504492

Changed in barbican:
status: In Progress → Fix Committed
Changed in barbican:
status: Fix Committed → Fix Released
Changed in barbican:
milestone: none → mitaka-1
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.