[Freeipa-devel] [PATCH 0119] ipatests: Extend the order plugin to properly handle inheritance
Tomas Babej
tbabej at redhat.com
Wed Oct 16 14:35:03 UTC 2013
On 10/16/2013 01:57 PM, Petr Viktorin wrote:
> On 10/14/2013 04:28 PM, Tomas Babej wrote:
>> Hi,
>>
>> When trying to create a new ordered test case by inheriting
>> from already defined test case, by overriding few of its methods,
>> the execution order of the tests is as follows:
>> - first all non-overriden test methods from the parent test class
>> - then all overriden tests methods
>
> That is not strictly true: if the base class is defined in a different
> file, with larger line numbers, with this patch its tests would run last.
>
>> This patch makes sure that methods are executed in the logical order,
>> that is, the order defined in the parent class.
>
> We'll also need to support longer inheritance chains than just one
> parent.
> The sort should look at the first @ordered superclass where the method
> was defined, and run the methods defined at the beginning of the
> inheritance chain first.
>
> I've modified your patch to accomplish this, does it look OK?
>
Thanks! This will even work with cross-module imports.
I added a section to the Integration testing design page:
http://www.freeipa.org/page/V3/Integration_testing#Ordering_of_the_tests
Also, I changed the commit message and comments to reflect the new
behaviour.
Updated patch attached.
Tomas
--
Tomas Babej
Associate Software Engeneer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131016/07f31a6e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-tbabej-0119-2-ipatests-Extend-the-order-plugin-to-properly-handle-.patch
Type: text/x-patch
Size: 2519 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20131016/07f31a6e/attachment.bin>
More information about the Freeipa-devel
mailing list