unitdata.KvStore() is not properly mocked out in the unit tests leading to race failures

Bug #1912486 reported by Alex Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph RADOS Gateway Charm
New
Undecided
Unassigned

Bug Description

==============================
Failed 1 tests - output below:
==============================

unit_tests.test_ceph_radosgw_context.HAProxyContextTests.test_ctxt
------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/zuul/src/opendev.org/openstack/charm-ceph-radosgw/.tox/py36/lib/python3.6/site-packages/mock/mock.py", line 1346, in patched
    return func(*newargs, **newkeywargs)

      File "/home/zuul/src/opendev.org/openstack/charm-ceph-radosgw/unit_tests/test_ceph_radosgw_context.py", line 66, in test_ctxt
    self.assertEqual(expect, haproxy_context())

      File "hooks/ceph_radosgw_context.py", line 59, in __call__
    ctxt = super(HAProxyContext, self).__call__()

      File "hooks/charmhelpers/contrib/openstack/context.py", line 953, in __call__
    db = kv()

      File "hooks/charmhelpers/core/unitdata.py", line 524, in kv
    _KV = Storage()

      File "hooks/charmhelpers/core/unitdata.py", line 189, in __init__
    self._init()

      File "hooks/charmhelpers/core/unitdata.py", line 389, in _init
    )''')

    sqlite3.OperationalError: database is locked

tags: added: onboarding
tags: added: good-first-bug
tags: removed: onboarding
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.