Change in vdsm[master]: tests: Add RWLock tests
nsoffer at redhat.com
nsoffer at redhat.com
Thu Jul 16 15:08:07 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: tests: Add RWLock tests
......................................................................
Patch Set 10:
(2 comments)
https://gerrit.ovirt.org/#/c/42907/10/tests/rwlock_test.py
File tests/rwlock_test.py:
Line 353: self.ready.set()
Line 354: with self._context:
Line 355: self.acquired.set()
Line 356: self.done.wait()
Line 357:
> I might like to reuse this class for my resourcelocker_tests. Where should
Lets put it in testlib also - this is not really related to readers-writer lock, it use a context that may work with any type of lock or even do something completely different.
Maybe rename to to ContextThread?
Line 358:
Line 359: def start_thread(func, *args, **kwargs):
Line 360: t = threading.Thread(target=func, args=args, kwargs=kwargs)
Line 361: t.daemon = True
Line 360: t = threading.Thread(target=func, args=args, kwargs=kwargs)
Line 361: t.daemon = True
Line 362: t.start()
Line 363: return t
Line 364:
> This seems like a good general-purpose utility for testlib.py
I'll move it to testlib.
Line 365:
Line 366: def stats(seq):
Line 367: seq = sorted(seq)
Line 368: avg = sum(seq) / float(len(seq))
--
To view, visit https://gerrit.ovirt.org/42907
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If404f0e8c68fcdb2f7643bdd6d5c1f97f230a227
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list