ShaoHe Feng has posted comments on this change.

Change subject: Improvement of the GuestAgent class memory usage
......................................................................


Patch Set 9: (2 inline comments)

....................................................
File tests/guestIFTests.py
Line 149:         for chunk in self.messageChunks(input, (self.maxMessageSize / 
2) + 1):
Line 150:             self.fakeGuestAgent._handleData(chunk)
Line 151: 
Line 152:         for (k, v) in expected.iteritems():
Line 153:             self.assertEqual(self.fakeGuestAgent.guestInfo[k], 
expected[k])
does it need to  check fakeGuestAgent.guestInfo items  their length >  
maxMessageSize still remain the default value,  which are not expect to be 
handled by _handleData?
Line 154: 
Line 155:     def testMixed(self):
Line 156:         testCase = namedtuple('testCase', 'msgType, message, 
assertDict')
Line 157:         for t in zip(_MSG_TYPES, _INPUTS, _OUTPUTS):


Line 177:                                      self.infoDefaults[k])
Line 178:                 else:
Line 179:                     # If the message size was within the allowed range
Line 180:                     # the message should have been put into the 
guestInfo dict
Line 181:                     
self.assertEqual(self.fakeGuestAgent.guestInfo[k], v)
IMO, fakeGuestAgent.guestInfo is better to set the default of value at the 
begin of every test case.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf6274bb10c9e3b80962b69c5df316f03ee21214
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to