Functional tests job runs setUpClass method for each thread

Bug #1509460 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
Fix Released
Critical
Valeriy Ponomaryov

Bug Description

Our Functional tests job "gate-manilaclient-dsvm-neutron-functional" runs class method "setUpClass" more than one time in case if we run tests in more than one thread and have more than one test in class.

So, it runs for each test of test suite that appeared in new thread.

And, with current state of tests, job creates 42 shares instead of 17. So, we have 25 redundant share creations. It is big waste of resources.

So, we should make our functional tests be spread among threads only by test suites and not by single tests.

tags: added: ci functional tests
Changed in python-manilaclient:
milestone: none → mitaka-1
importance: Undecided → Critical
description: updated
description: updated
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Set tag "backport-liberty-potential" as it is blocker for merging any changes to Liberty branch.

tags: added: backport-liberty-potential
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

python-cinderclient also has same bug. But it just does not suffer from it as it does not use "setUpClass" methods.

Changed in python-manilaclient:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Changed in python-cinderclient:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

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

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

Reviewed: https://review.openstack.org/239428
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=7962533b94ae4abf48b3bdbc65564e7c1d6e6c7f
Submitter: Jenkins
Branch: master

commit 7962533b94ae4abf48b3bdbc65564e7c1d6e6c7f
Author: Valeriy Ponomaryov <email address hidden>
Date: Mon Oct 26 15:02:07 2015 +0200

    Fix usage of setUpClass method in functional tests

    Class method 'setUpClass' is executed for each test of test suite that
    appeared in new thread. It leads to creation of redundant resources,
    and, hence, waste of resources.

    So, add 'group_regex' option in testr config that will make all tests
    of each class run in one thread.

    Change-Id: I8100a98961791cee52b0866c7d593cc8371b3329
    Closes-Bug: #1509460

Changed in python-manilaclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-manilaclient (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/239526

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (stable/liberty)

Reviewed: https://review.openstack.org/239526
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=dc692573091a2cc56e11b82cc2c293302c60fd43
Submitter: Jenkins
Branch: stable/liberty

commit dc692573091a2cc56e11b82cc2c293302c60fd43
Author: Valeriy Ponomaryov <email address hidden>
Date: Mon Oct 26 15:02:07 2015 +0200

    Fix usage of setUpClass method in functional tests

    Class method 'setUpClass' is executed for each test of test suite that
    appeared in new thread. It leads to creation of redundant resources,
    and, hence, waste of resources.

    So, add 'group_regex' option in testr config that will make all tests
    of each class run in one thread.

    Change-Id: I8100a98961791cee52b0866c7d593cc8371b3329
    Closes-Bug: #1509460
    (cherry picked from commit 7962533b94ae4abf48b3bdbc65564e7c1d6e6c7f)

tags: added: in-stable-liberty
Changed in python-cinderclient:
status: In Progress → Fix Committed
no longer affects: python-cinderclient
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-manilaclient 1.6.0

This issue was fixed in the openstack/python-manilaclient 1.6.0 release.

Changed in python-manilaclient:
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.