[testing] Refactor Auxiliary Methods

Bug #1257391 reported by Allele Dev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Wishlist
Victoria Martinez de la Cruz

Bug Description

Our current approach to testing has some awesome benefits. Namely, anyone can install the Marconi core package, and start writing their own third-party drivers, and utilize the base test classes which offer great conformance tests.

However, there is a devious problem. Currently, there is no easy way to define methods that can be overridden by children test classes short of the author exposing their own X{Queue, Messages, Claims}ControllerTest classes, where X is the storage backend. Also, recently, a bug was patched (https://review.openstack.org/#/c/59539) that as a result of the diamond inheritance problem introduced by a Mixin class, would cause the Mongodb storage suite to consume ~19GB per run.

The goal here is twofold, and it's all refactoring:

1. Make it possible to expose methods that can be overridden easily in some base class (_purge_databases, _prepare_conf, etc.)

While...

2. Keeping things extensible and making it difficult to encounter the diamond problem.

"There should be one-- and preferably only one --obvious way to do it."

Allele Dev (alleledev)
Changed in marconi:
importance: Undecided → Low
Kurt Griffiths (kgriffs)
Changed in marconi:
importance: Low → Wishlist
status: New → Triaged
Changed in marconi:
assignee: nobody → Victoria Martínez de la Cruz (vkmc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

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

Changed in marconi:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/98916
Committed: https://git.openstack.org/cgit/openstack/marconi/commit/?id=67d936902d1ba3b6491ecb5e2cdadde05b362e1d
Submitter: Jenkins
Branch: master

commit 67d936902d1ba3b6491ecb5e2cdadde05b362e1d
Author: Victoria Martínez de la Cruz <email address hidden>
Date: Mon Jun 9 19:27:38 2014 -0300

    Refactor auxiliary methods for MongoDB unit tests

    This patchset DRYes the implementation of auxiliary
    functions in MongoDB unit tests.

    Change-Id: Ie6a3bfc0d20d8d30bd484a9fec2063e1c191c7c4
    Closes-Bug: #1257391

Changed in marconi:
status: In Progress → Fix Committed
Changed in marconi:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in zaqar:
milestone: juno-2 → 2014.2
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.