Flacky unit test with py36

Bug #1940552 reported by Gustavo Sanchez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Manila Charm
Fix Released
Undecided
Gustavo Sanchez

Bug Description

Sometimes unit test TestManilaCharm.test_install() in test_lib_charm_openstack_manila.py passes and sometimes it throws an error after mocking using charms_openstack.test_utils.PatchHelper.patch()

The problem is just present in py36 unit tests

https://pastebin.canonical.com/p/pDxq5X5qfy/

Problem seems to be trying to mock super().install() of class ManilaCharm(charms_openstack.charm.HAOpenStackCharm)

description: updated
Changed in charm-manila:
assignee: nobody → Gustavo Sanchez (gustavosr98)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-manila (master)
Changed in charm-manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-manila (master)

Reviewed: https://review.opendev.org/c/openstack/charm-manila/+/805405
Committed: https://opendev.org/openstack/charm-manila/commit/310647c2bd3010f0ae9096e396d21402d20a95bf
Submitter: "Zuul (22348)"
Branch: master

commit 310647c2bd3010f0ae9096e396d21402d20a95bf
Author: Gustavo Sanchez <email address hidden>
Date: Fri Aug 20 10:41:53 2021 -0400

    Fixes flacky unit test wih py36

    When running TestManilaCharm.test_install() with py36 sometimes
    test passes and sometimes throws and error while mocking methods.
    Seems to be an async race problem mocking a super method first.

    This was solved by avoiding mocking super method first.

    Closes-Bug: #1940552
    Change-Id: Iac55321599b4866784a0631639a93fc828780647

Changed in charm-manila:
status: In Progress → Fix Committed
Changed in charm-manila:
milestone: none → 21.10
Changed in charm-manila:
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.