← Back to team overview

openstack team mailing list archive

Re: help me with the xenapi test

 

Sincere apologies for cluttering this thread with another post.

I think I probably found the root cause of the test failure. It seems that
a setattr on FLAGS.flat_injected was causing the problem.
I don't know exactly why, and probably that does not even matter, as
setattr globally alters the value of flag, and we probably don't want this
to happen anyway.
The value of the flag can be altered for a single test case using the
following syntax: self.flags(flat_injected=True)

The full diff for test_quantumv2.py - which executes correctly the tests -
is available here: http://paste.openstack.org/show/19204/

Regards,
Salvatore

On 2 July 2012 22:53, Salvatore Orlando <sorlando@xxxxxxxxxx> wrote:

> Hi Yong,
>
> I have been able to reproduce the error on my dev machine - I couldn't
> earlier on because I was tesyinh the test_xenapi module only, and no
> failure occured.
>
> It seems that test_quantumv2 is the root cause. If you look at gerrit,
> Jenkins started complaining when you first added that module.
> Indeed, if you rename it to _test_quantumv2, the error disappears.
>
> I guess the problem is that quantum_v2 apparently is the only test modules
> whose test cases do not inherit from nova.test. I am trying to understand
> what exactly causes then the failure in test_xenapi. My gut says it must
> have something to do with mox, but I will let you know soon - unfortunately
> each test run takes almost 10 minutes!
>
> Salvatore
>
> On 2 July 2012 19:18, Salvatore Orlando <sorlando@xxxxxxxxxx> wrote:
>
>> Hi Yong,
>>
>> I do not see any obvious reason for these failures, especially as they
>> appear to occur when the vdi is created. If I recall it correctly, that
>> code is stubbed out for unit tests, and it does not seem your patch
>> un-stubs it.
>> Do you see the failures also on your dev machine?
>>
>> Salvatore
>>
>> On 2 July 2012 14:30, Yong Sheng Gong <gongysh@xxxxxxxxxx> wrote:
>>
>>> hi,
>>>
>>> In my change at https://review.openstack.org/#/c/8916/, some xenapi
>>> tests alway fail:
>>> >>><<< nova.tests.test_xenapi.XenAPIMigrateInstance.test_finish_migrate<https://jenkins.openstack.org/job/gate-nova-python26/1386/testReport/nova.tests.test_xenapi/XenAPIMigrateInstance/test_finish_migrate/>
>>>
>>> Loading...
>>> 10 sec1 <https://jenkins.openstack.org/job/gate-nova-python26/1386/>>>>
>>> <<<
>>> nova.tests.test_xenapi.XenAPIMigrateInstance.test_finish_migrate_no_local_storage<https://jenkins.openstack.org/job/gate-nova-python26/1386/testReport/nova.tests.test_xenapi/XenAPIMigrateInstance/test_finish_migrate_no_local_storage/>
>>>
>>> Loading...
>>> 10 sec1 <https://jenkins.openstack.org/job/gate-nova-python26/1386/>>>>
>>> <<<
>>> nova.tests.test_xenapi.XenAPIMigrateInstance.test_finish_migrate_no_resize_vdi<https://jenkins.openstack.org/job/gate-nova-python26/1386/testReport/nova.tests.test_xenapi/XenAPIMigrateInstance/test_finish_migrate_no_resize_vdi/>
>>>
>>> Loading...
>>> 10 sec1 <https://jenkins.openstack.org/job/gate-nova-python26/1386/>>>>
>>> <<< nova.tests.test_xenapi.XenAPIMigrateInstance.test_revert_migrate<https://jenkins.openstack.org/job/gate-nova-python26/1386/testReport/nova.tests.test_xenapi/XenAPIMigrateInstance/test_revert_migrate/>
>>>
>>> Who can help me find the reason?
>>> Thanks
>>> Yong Sheng Gong
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>

References