Commit 4283b91d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d1fc5e8c
......@@ -113,6 +113,10 @@ def timeout(parent=context.background()): # -> ctx
ctx, _ = with_timeout()
return ctx
# XXX
def tdelay():
time.sleep(10*time.millisecond) # XXX -> 1ms ?
# ---- test join/autostart ----
......@@ -780,9 +784,10 @@ def _watch(twlink, zf, at, pinok, replyok):
def _(ctx):
pinv = twlink._expectPin(ctx, zf, pinok)
tdelay() # increase probability to receive erroneous extra pins
for p in pinv:
p.reply(b"ack") # XXX -> return to caller?
# check that we don't get extra pins before "ok" reply to "watch"
# check that we don't get extra pins before reply to "watch"
try:
req = twlink.recvReq(ctx)
except Exception as e:
......@@ -961,7 +966,20 @@ def test_wcfs():
at4 = t.commit()
f.assertCache([1,1,0,1,0,0]) # FIXME a must be invalidated - see ^^^
f.assertBlk(2, '4c') -> pin 2
ev = []
def _(ctx):
ev.append('pin rx')
tdelay() # XXX + ev.sleep ?
ev.append('pin ack')
pin.ack()
ev.append('read pre')
blk = f.blk(2)
blk[0] # read access -> XXX without GIL
ev.append('read post')
f.assertBlk(2, '4c')
assert ev == ['read pre', 'pin rx', 'pin ack', 'read post']
# XXX commit after current file size -> watch
......
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