[Freeipa-devel] [PATCH 0119] ipatests: Extend the order plugin to properly handle inheritance

Petr Viktorin pviktori at redhat.com
Thu Oct 17 08:48:56 UTC 2013


On 10/16/2013 04:35 PM, Tomas Babej wrote:
> 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.
>

Great! ACK, pushed to
master: 096a49766d6706a05231621b0993acd2e734b0f1
ipa-3-3: 76694f161089a538b37191280c82454d34bebcb9

-- 
Petr³




More information about the Freeipa-devel mailing list