Nir Soffer has posted comments on this change.

Change subject: cache: Add caching decorator with invalidation
......................................................................


Patch Set 6:

(2 comments)

http://gerrit.ovirt.org/#/c/34709/6/tests/cacheTests.py
File tests/cacheTests.py:

Line 55: 
Line 56: 
Line 57: class MemoizedTests(VdsmTestCase):
Line 58: 
Line 59:     def _update_file_content_and_verify(self, validator):
This helper and the tests using it do not belong to this class. Lets remove 
them to MemoizedFileTests class.
Line 60:         with namedTemporaryDir() as tempdir:
Line 61:             path = os.path.join(tempdir, 'data')
Line 62:             read_count = [0]
Line 63: 


Line 219:     def test_update_when_file_content_changed(self):
Line 220:         self._update_file_content_and_verify(file_content_changed)
Line 221: 
Line 222: 
Line 223: @tools.nottest
This usage of nottest is confusing. I think this can be more clear by 
implementing some helper methods (e.g. check_xxx) in the super class, and 
invoking them in the subclass.
Line 224: class FilePresenceTests(VdsmTestCase):
Line 225: 
Line 226:     validator_class = None
Line 227: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6dd8fb29d94286e3e3a3e29b8218501cbdc5c018
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <t...@midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdel...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to