Fix unmocking of shared objects in unit tests

Bug #1448273 reported by Petr Malik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Peter Stachowski

Bug Description

A placeholder for fixing leaked mock objects in Trove unit tests.

Etherpad page where you can sign up for modules: https://etherpad.openstack.org/p/mock-leak-cleanup

Related-Bug: 1447833

Tags: mock test
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
assignee: nobody → Petr Malik (pmalik)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in trove:
assignee: Petr Malik (pmalik) → Peter Stachowski (peterstac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in trove:
assignee: Peter Stachowski (peterstac) → Petr Malik (pmalik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in trove:
assignee: Petr Malik (pmalik) → Peter Stachowski (peterstac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/180806
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=e0d93e21d9aed0235b41f72c89c86b227c8086aa
Submitter: Jenkins
Branch: master

commit e0d93e21d9aed0235b41f72c89c86b227c8086aa
Author: Peter Stachowski <email address hidden>
Date: Wed May 6 23:57:54 2015 +0000

    Added dangling mock detection to 'secgroups'

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: Ib27f0c775c47fb31c277f1d07c3ad7975175fa12
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180828
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=33e542522e0085f11e3de94ead784959936e94b2
Submitter: Jenkins
Branch: master

commit 33e542522e0085f11e3de94ead784959936e94b2
Author: Peter Stachowski <email address hidden>
Date: Thu May 7 02:05:51 2015 +0000

    Added dangling mock detection to 'conductor'

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: I5e0aa86d01a438eb74bbde06f2c6b8ed2c5cda86
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180798
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=9382ab97f138c38c61b7c4cfa459832da04bdcc2
Submitter: Jenkins
Branch: master

commit 9382ab97f138c38c61b7c4cfa459832da04bdcc2
Author: Peter Stachowski <email address hidden>
Date: Wed May 6 23:55:48 2015 +0000

    Added dangling mock detection to 'taskmanager'

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: Ic26c4b1f173774f4280dc8a75b497d53bff5477a
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180831
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=cb8f0897318a3a361044bbebae9409adef0bedcc
Submitter: Jenkins
Branch: master

commit cb8f0897318a3a361044bbebae9409adef0bedcc
Author: Peter Stachowski <email address hidden>
Date: Thu May 7 02:14:58 2015 +0000

    Added dangling mock detection to 'mgmt' module

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: I3716f1c81138f24b23bb7b694bb8eb957c4360b7
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180720
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=fa22208f4fc25337ccd69b6ac85b5fed9a61d6c2
Submitter: Jenkins
Branch: master

commit fa22208f4fc25337ccd69b6ac85b5fed9a61d6c2
Author: Peter Stachowski <email address hidden>
Date: Wed May 6 20:06:19 2015 +0000

    Added dangling mock detection to 'cluster' module

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: I2f88cd9e7effcc6389abf8537417f1b3d6f1efc7
    Partial-Bug: 1448273

Changed in trove:
assignee: Peter Stachowski (peterstac) → Nikhil Manchanda (slicknik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180760
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=34e6cc20fb45f1fc9578b6bc292c7f8865567107
Submitter: Jenkins
Branch: master

commit 34e6cc20fb45f1fc9578b6bc292c7f8865567107
Author: Petr Malik <email address hidden>
Date: Sun May 3 23:30:21 2015 -0400

    Fix leaked mocks in the 'upgrade' module if any

    Make all test suites in the module extend 'trove_testtools.TestCase' to
    enable dangling mock detector.

    I also rewrote tests for 'create()' method of 'UpgradeMessageSender'.
    The original implementation tested the Mock library rather than the
    Trove code.

    Change-Id: I862b9b6c3dbca1958f314b169863cdbeeb7e3b53
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180740
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=a24bc356737bb22bef976bba761528d308a0b969
Submitter: Jenkins
Branch: master

commit a24bc356737bb22bef976bba761528d308a0b969
Author: Peter Stachowski <email address hidden>
Date: Wed May 6 20:48:49 2015 +0000

    Added dangling mock detection to 'backup' module

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: I738c874809708dd0587f276be585fbe957209268
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180832
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180794
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180730
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180713
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180731
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Peter Stachowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/180825
Reason: I've spent too much time on this

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Petr Malik (<email address hidden>) on branch: master
Review: https://review.openstack.org/180690
Reason: Merged into 180757

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Petr Malik (<email address hidden>) on branch: master
Review: https://review.openstack.org/180755
Reason: Merged into 180757

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Petr Malik (<email address hidden>) on branch: master
Review: https://review.openstack.org/180773
Reason: Merged into 180757

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Petr Malik (<email address hidden>) on branch: master
Review: https://review.openstack.org/180756
Reason: Merged into 180757

Changed in trove:
assignee: Nikhil Manchanda (slicknik) → Petr Malik (pmalik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/180689
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=fbfc1cfab00178b423a8600a5797ecb4b31cd84b
Submitter: Jenkins
Branch: master

commit fbfc1cfab00178b423a8600a5797ecb4b31cd84b
Author: Petr Malik <email address hidden>
Date: Sun May 3 20:10:42 2015 -0400

    Fix leaked mocks in the 'common' module if any

    Make all test suites in the module extend 'trove_testtools.TestCase' to
    enable dangling mock detector.

    Change-Id: I378878a2e3129c2d694695fbe3bb4174826386be
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/180757
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=8fa76ceff8e8460138f5dbebaf0a4e0c341fbc3d
Submitter: Jenkins
Branch: master

commit 8fa76ceff8e8460138f5dbebaf0a4e0c341fbc3d
Author: Petr Malik <email address hidden>
Date: Sun May 3 21:43:23 2015 -0400

    Update modules to turn on dangling mock detection

    Make all test suites in the api, configuration, instance, network,
    mysql, router, quota, db, and datastore modules extend
    'trove_testtools.TestCase' to enable dangling mock detection.

    Co-Authored-By: Peter Stachowski <email address hidden>
    Change-Id: If9326709d76972d66fb40b4984bbb5214b0c5189
    Partial-Bug: 1448273

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

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

Changed in trove:
assignee: Petr Malik (pmalik) → Sushil Kumar (sushil-kumar2)
Changed in trove:
assignee: Sushil Kumar (sushil-kumar2) → Peter Stachowski (peterstac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/180731
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=b5c4f8bb1851aa36095b8f09285a630db3f86fbe
Submitter: Jenkins
Branch: master

commit b5c4f8bb1851aa36095b8f09285a630db3f86fbe
Author: Peter Stachowski <email address hidden>
Date: Wed May 6 20:34:27 2015 +0000

    Added dangling mock detection to 'dns' module

    Ensured that no dangling mocks exist in the module by having each test
    class extend trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: I5020c1d5dcb678957a21897daead7e794f7c408e
    Partial-Bug: 1448273

Changed in trove:
assignee: Peter Stachowski (peterstac) → Sushil Kumar (sushil-kumar2)
Changed in trove:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
assignee: Sushil Kumar (sushil-kumar2) → Petr Malik (pmalik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/183067
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=ab2cea10b64ee187cbd4e5aa511e23352737ad48
Submitter: Jenkins
Branch: master

commit ab2cea10b64ee187cbd4e5aa511e23352737ad48
Author: Sushil Kumar <email address hidden>
Date: Thu May 14 14:40:35 2015 +0000

    Fix leaked mocks in the 'guestagent/test_api' module

    Make all test suites in the module extend
    'trove_testtools.TestCase' to enable dangling mock detector.

    There was also a need to add a mocked entry to
    upgrade/test_models.py. Previous implementation was
    working because of leaked mock from guestagent/test_api.py

    Needed an update to guestagent/test_vertica_api.py which was
    earlier passing because of leaked mock from guestagent/test_api.py.

    Change-Id: If8d654c3a6d2f47d2a4ffa70bab72201dd053226
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/186108
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=3db861fb204a2093206f64eb690edc7c6b319bc5
Submitter: Jenkins
Branch: master

commit 3db861fb204a2093206f64eb690edc7c6b319bc5
Author: Petr Malik <email address hidden>
Date: Wed May 27 12:03:30 2015 -0400

    Fix leaked mocks in the 'LimitsControllerTest'

    Fix leftover mocked QUOTAS import in LimitsControllerTest.

    Change-Id: Ib0fc5a8c5694cf5c08af8cb54e54472472dda840
    Partial-Bug: 1448273

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

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

Changed in trove:
assignee: Petr Malik (pmalik) → Peter Stachowski (peterstac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/180825
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=4be4daa8e1b7edb204293bb6cd9aff5ae13241a6
Submitter: Jenkins
Branch: master

commit 4be4daa8e1b7edb204293bb6cd9aff5ae13241a6
Author: Peter Stachowski <email address hidden>
Date: Thu May 7 00:47:48 2015 +0000

    Added dangling mock detection to 'guestagent'

    Ensured that no dangling mocks exist by having each test class extend
    trove_testtools.TestCase

    Ran 'tox -epy27' and fixed any detected problems.

    Change-Id: Ib43b86f74036a71c65bd2b1bd7b0905a1d8520b7
    Partial-Bug: 1448273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/188105
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=e3456b114444e29769cb3dd094157c75bd675145
Submitter: Jenkins
Branch: master

commit e3456b114444e29769cb3dd094157c75bd675145
Author: Petr Malik <email address hidden>
Date: Wed Jun 3 13:29:39 2015 -0400

    Fix leaked mocks in the 'MockMgmtInstanceTest'

    Fix a leftover mock in MockMgmtInstanceTest.

    Change-Id: I3e2aa1cd0e800d4b730fc16b147183e05f701487
    Partial-Bug: 1448273

Changed in trove:
milestone: none → liberty-1
Changed in trove:
milestone: liberty-1 → liberty-2
Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: liberty-2 → 4.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

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

Reviewed: https://review.openstack.org/265008
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=30a133533a30432dedc5140346927f2e7e5ff301
Submitter: Jenkins
Branch: master

commit 30a133533a30432dedc5140346927f2e7e5ff301
Author: Petr Malik <email address hidden>
Date: Thu Jan 7 18:16:59 2016 -0500

    Fix leaked mocks in 'test_dbaas'

    Make all test classes use the mock detector ('trove_testtools') and
    unmock all discovered leaked mocks in the 'test_dbaas' module.

    Partial-Bug: 1448273
    Change-Id: I02b3c32ebd2f7d9cd20624e91770533c3dc0c0f3

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

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

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

Reviewed: https://review.openstack.org/274474
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=be70c690b8fef9caa21caa3233b80903e588ffaa
Submitter: Jenkins
Branch: master

commit be70c690b8fef9caa21caa3233b80903e588ffaa
Author: Petr Malik <email address hidden>
Date: Sun Jan 31 18:54:38 2016 -0500

    Unittests use trove_testtools

    Replace 'testtools' with 'trove_testtools' in several manager tests
    (not already handled in other patch sets):

    - mysql
    - db2
    - pxc
    - couchdb
    - couchbase
    - cassandra

    Change-Id: Ide059379bf32c1e9c985629e3f4de3ceaaf14389
    Closes-Bug: 1448273

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/trove 5.0.0.0b3

This issue was fixed in the openstack/trove 5.0.0.0b3 development milestone.

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.