8 unit tests do not mock out kv() leading to lock errors in parallel run tests

Bug #1905760 reported by Alex Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Percona Cluster Charm
Fix Released
Undecided
Unassigned

Bug Description

The 8 unit tests are:

    unit_tests.test_percona_hooks.TestUpgradeCharm.test_upgrade_charm_leader
    unit_tests.test_percona_hooks.TestClusterRelation.test_needs_to_be_mark_as_seeded
    unit_tests.test_percona_utils.UtilsTestsStatus.test_bootstrapped_not_in_sync_to_synced
    unit_tests.test_percona_utils.UtilsTestsStatus.test_not_bootstrapped
    unit_tests.test_percona_utils.UtilsTestsStatus.test_insufficient_peers
    unit_tests.test_percona_utils.UtilsTestsStatus.test_single_unit
    unit_tests.test_percona_utils.UtilsTestsStatus.test_bootstrapped_in_sync
    unit_tests.test_percona_utils.UtilsTestsStatus.test_bootstrapped_not_in_sync

This results in a race (for py37 definitely observed: https://review.opendev.org/c/openstack/charm-percona-cluster/+/761449) where a test will fail because another, parallel running unit test, is holding a lock on the underlying SQLite database). kv() should be mocked out for these tests.

Changed in charm-percona-cluster:
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :
Changed in charm-percona-cluster:
status: New → In Progress
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Fix was merged on 2020-11-27.

Changed in charm-percona-cluster:
assignee: Alex Kavanagh (ajkavanagh) → nobody
milestone: none → 21.01
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-percona-cluster:
status: Fix Committed → Fix Released
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.