Change in vdsm[master]: networkTests: UNKNOWN operstate
danken at redhat.com
danken at redhat.com
Tue Aug 12 13:41:03 UTC 2014
Dan Kenigsberg has posted comments on this change.
Change subject: networkTests: UNKNOWN operstate
......................................................................
Patch Set 6: Code-Review-1
(2 comments)
http://gerrit.ovirt.org/#/c/30787/6/tests/functional/networkTests.py
File tests/functional/networkTests.py:
Line 161:
Line 162: @contextmanager
Line 163: def nonChangingOperstate(device):
Line 164: """Raises an exception if it detects that the device link state changes."""
Line 165: class UnknownStateException(Exception):
please extract the new hack into a new function named _waitForKnownState() or something like that.
Would it be difficult to implement that function using the event monitor, instead of blind retries?
Line 166: pass
Line 167:
Line 168: def _getState():
Line 169: state = operstate(device).upper()
Line 172: else:
Line 173: return state
Line 174:
Line 175: originalState = retry(_getState, expectedException=UnknownStateException,
Line 176: tries=5)
I suspect that a shorter sleep=0.1 would be more fitting here?
Line 177: monitor = ipwrapper.Monitor()
Line 178: monitor.start()
Line 179: try:
Line 180: yield
--
To view, visit http://gerrit.ovirt.org/30787
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a5a059e717a331ae5e01cb64b7badc6757d4257
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list