commit d240b281129111d568d420d64450bbd0aac7a561
Author: Roman Podoliaka <email address hidden>
Date: Mon Feb 23 19:12:34 2015 +0200
Fix the order of base classes in migrations test cases
Next release of oslo.db is going to break Nova migrations tests: when
a test case cleanup is run it fails to fetch 'schema' attribute of
oslo.db base test case sets in its setup. The problem is that Nova
base test case intentionally removes all attributes from a test case
class instance in its cleanup callback (to ensure there are no memory
leaks).
Inheritance from Nova base test case was actually added when fixing
LP #1410235, so that TIMEOUT_SCALING_FACTOR attribute would be
handled properly (at that time it was done directly in Nova base test
case setUp(), and now it's a separate fixture).
So in order for Nova unit tests to work correctly with new release of
oslo.db we need either to remove inheritance from Nova base test case
or to change the order of base classes to achieve the 'proper' MRO
for migration test cases. The latter can actually be problematic as
we also need to ensure TIMEOUT_SCALING_FACTOR is still handled
properly and not overridden by oslotest base test case.
Reviewed: https:/ /review. openstack. org/158364 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d240b281129 111d568d420d644 50bbd0aac7a561
Committed: https:/
Submitter: Jenkins
Branch: master
commit d240b281129111d 568d420d64450bb d0aac7a561
Author: Roman Podoliaka <email address hidden>
Date: Mon Feb 23 19:12:34 2015 +0200
Fix the order of base classes in migrations test cases
Next release of oslo.db is going to break Nova migrations tests: when
a test case cleanup is run it fails to fetch 'schema' attribute of
oslo.db base test case sets in its setup. The problem is that Nova
base test case intentionally removes all attributes from a test case
class instance in its cleanup callback (to ensure there are no memory
leaks).
Inheritance from Nova base test case was actually added when fixing SCALING_ FACTOR attribute would be
LP #1410235, so that TIMEOUT_
handled properly (at that time it was done directly in Nova base test
case setUp(), and now it's a separate fixture).
So in order for Nova unit tests to work correctly with new release of SCALING_ FACTOR is still handled
oslo.db we need either to remove inheritance from Nova base test case
or to change the order of base classes to achieve the 'proper' MRO
for migration test cases. The latter can actually be problematic as
we also need to ensure TIMEOUT_
properly and not overridden by oslotest base test case.
Related-Bug: #1410235
Change-Id: I5c7d2a39142576 6a5e8fd61a532b1 a1e7d410770