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 <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes