Commit cdd8f2a5 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 47e453f7
...@@ -1558,6 +1558,11 @@ func main() { ...@@ -1558,6 +1558,11 @@ func main() {
rev: 0, rev: 0,
zconn: zhead, zconn: zhead,
} }
watch := &Watch{
fsNode: newFSNode(fSticky),
}
bfdir := &BigFileDir{ bfdir := &BigFileDir{
fsNode: newFSNode(fSticky), fsNode: newFSNode(fSticky),
head: head, head: head,
...@@ -1609,6 +1614,7 @@ func main() { ...@@ -1609,6 +1614,7 @@ func main() {
mkdir(root, "head", head) mkdir(root, "head", head)
mkdir(head, "bigfile", bfdir) mkdir(head, "bigfile", bfdir)
mkfile(head, "at", NewSmallFile(head.readAt)) // TODO mtime(at) = tidtime(at) mkfile(head, "at", NewSmallFile(head.readAt)) // TODO mtime(at) = tidtime(at)
mkfile(head, "watch", watch)
// for debugging/testing // for debugging/testing
_wcfs := newFSNode(fSticky) _wcfs := newFSNode(fSticky)
......
...@@ -32,9 +32,9 @@ import transaction ...@@ -32,9 +32,9 @@ import transaction
from persistent import Persistent from persistent import Persistent
from persistent.timestamp import TimeStamp from persistent.timestamp import TimeStamp
import os, os.path, subprocess import os, os.path, subprocess, threading
from errno import EINVAL from errno import EINVAL
from golang import func, defer from golang import go, chan, func, defer
from zodbtools.util import ashex as h, fromhex from zodbtools.util import ashex as h, fromhex
from pytest import raises from pytest import raises
from .internal import mm from .internal import mm
...@@ -482,12 +482,12 @@ class tSrvReq: ...@@ -482,12 +482,12 @@ class tSrvReq:
def reply(req, answer): def reply(req, answer):
t = req.twatch t = req.twatch
with t._mu: with t._mu:
assert stream in t._accepted assert req.stream in t._accepted
t._send(req.stream, answer) t._send(req.stream, answer)
with t._mu: with t._mu:
assert stream in t._accepted assert req.stream in t._accepted
t._accepted.delete(req.stream) t._accepted.delete(req.stream)
# XXX also track as answered? (and don't accept with the same ID ?) # XXX also track as answered? (and don't accept with the same ID ?)
......
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