Commit 6dc5272d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 82f13653
......@@ -136,9 +136,11 @@ def timeout(parent=context.background()): # -> ctx
ctx, _ = with_timeout()
return ctx
# XXX
# tdelay is used in places where we need to delay a bit in order to e.g. raise
# probability of a bug due to race condition.
def tdelay():
time.sleep(1*time.millisecond) # XXX -> 10ms ?
time.sleep(10*time.millisecond)
# DF represents a change in files space.
# it corresponds to ΔF in wcfs.go .
......@@ -163,9 +165,19 @@ class DFile:
# BigFiles opened under tDB are represented as tFile - see .open for details.
# Watches opened under tDB are represented as tWatchLink - see .openwatch for details.
#
# XXX .root + .wc
#
# XXX .change + .commit
# XXX .dFtail + .head
# + .iter_revv
#
# XXX .open -> .topen
# XXX .openwatch -> .topenwatch ?
#
# XXX .close
#
# XXX .path/.read/.stat/._open
#
# XXX print -> t.trace/debug() + t.verbose depending on py.test -v -v ?
class tDB:
def __init__(t):
......@@ -649,7 +661,7 @@ class tWatch:
# tWatchLink provides testing environment for /head/watch link opened on wcfs.
#
# .sendReq()/.recvReq() provides raw IO in terms of wcfs invalidation protocol messages.
# .watch() setups/adjusts a watch for a file and verifies that wcfs sends correct initial pins.
# .watch() setups/adjusts a watch for a file and verifies that wcfs correctly sends initial pins.
class tWatchLink:
def __init__(t, tdb):
......@@ -927,7 +939,7 @@ def _pinAt(t, zf, at): # -> pin = {} blk -> rev
# pinok: {} blk -> rev
# pinok can be None - in that case it is computed automatically.
@func(tWatchLink)
def watch(twlink, zf, at, pinok=None): # XXX -> ?
def watch(twlink, zf, at, pinok=None): # XXX -> tWatch ?
t = twlink.tdb
w = twlink._watching.get(zf)
if w is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment