Zhou Zheng Sheng has posted comments on this change.

Change subject: xmlrpcTests: narrow the expected exception when using retry
......................................................................


Patch Set 3: (1 inline comment)

....................................................
File tests/testrunner.py
Line 101:     def retryAssert(self, *args, **kwargs):
Line 102:         '''Keep retrying an assertion if AssertionError is raised.
Line 103:            See function utils.retry for the meaning of the arguments.
Line 104:         '''
Line 105:         from vdsm.utils import retry
We can not import vdsm.utils on module level.

When the unit test is run from the project source tree, we want to import the 
module from the local source. After the test package is installed into the 
system, when the unit test is run from the installed directory, we want to 
import the module from the installed dir. This work is done by  the function 
hackVdsmModule().

We can only import vdsm.utils correctly after hackVdsmModule() is called in 
line 263. So I just put this import in the method retryAssert(). Do you think 
it needs some comment to explain why it is put here?
Line 106:         retry(expectedException=AssertionError, *args, **kwargs)
Line 107: 
Line 108: 
Line 109: class VdsmTestResult(result.TextTestResult):


--
To view, visit http://gerrit.ovirt.org/8444
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0deded14d02a21bcfbca49dbdfadfe8652added3
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to