From Dan Kenigsberg <[email protected]>:

Dan Kenigsberg has posted comments on this change.

Change subject: net func test: Existing NM test should cleanup even if it fails
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/69276/1/tests/network/func_net_basic_test.py
File tests/network/func_net_basic_test.py:

Line 105:         iface = iface_name()
Line 106:         NET = {NETWORK_NAME: {'bonding': iface, 'switch': 
self.switch}}
Line 107:         with nm_connections(iface, IPv4_ADDRESS, con_count=3):
Line 108:             try:
Line 109:                 with self.setupNetworks(NET, {}, NOCHK):
shouldn't you open the try-block only here, after we are sure that the bond has 
been acquired? If setupNetwork explodes before it yields, we should not attempt 
to clean up.
Line 110:                     self.assertNetwork(NETWORK_NAME, 
NET[NETWORK_NAME])
Line 111:             finally:
Line 112:                 # The bond was acquired, therefore VDSM needs to 
clean it.
Line 113:                 BONDREMOVE = {iface: {'remove': True}}


-- 
To view, visit https://gerrit.ovirt.org/69276
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If66640134404be54792cf69a22056b64a2c94b85
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Edward Haas <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to