Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
083fbaa1
Commit
083fbaa1
authored
May 09, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f39029a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-5
No files found.
wcfs/wcfs_test.py
View file @
083fbaa1
...
...
@@ -306,7 +306,6 @@ class tDB:
return
zfs
# tFile provides testing environment for one bigfile on wcfs.
#
# .blk() provides access to data of a block. .cached() gives state of which
...
...
@@ -511,7 +510,7 @@ class tWatch:
# _send sends raw message via specified stream.
#
# multiple _send can be called in parallel - _send serializes writes.
# XXX +ctx
# XXX +ctx
?
def
_send
(
t
,
stream
,
msg
):
assert
'
\
n
'
not
in
msg
with
t
.
_txmu
:
...
...
@@ -665,6 +664,7 @@ def test_wcfs():
f
.
assertCache
([
1
,
1
,
0
,
1
])
# f @head
f
.
assertCache
([
1
,
1
,
0
,
1
])
f
.
assertData
([
b''
,
b''
,
b'kitty'
,
b'gamma'
],
mtime
=
t
.
head
)
# f @at2
...
...
@@ -677,17 +677,16 @@ def test_wcfs():
# >>> f close / open again -> cache must not be lost
# XXX bit flaky since OS can evict whole f cache under pressure
# XXX
a
bit flaky since OS can evict whole f cache under pressure
f
.
assertCache
([
1
,
1
,
1
,
1
])
f
.
close
()
# XXX os.sync?
f
=
t
.
open
(
zf
)
assert
f
.
cached
()
!=
[
0
,
0
,
0
,
0
]
# >>> XXX commit data to not yet accessed f part - nothing happens
#
XXX invalidation protocol ...
#
>>> invalidation protocol
print
(
'
\
n
\
n
inv. protocol
\
n
\
n
'
)
bg
=
context
.
background
()
...
...
@@ -719,6 +718,8 @@ def test_wcfs():
# open watch, send watch request and check that we receive pins for
# in-cache blocks changed > at.
w
=
t
.
openwatch
()
# defer(w.close) XXX close here, or checkSetupWatch -> tDB.topenwatch(zf, at) ?
ctx
,
cancel
=
context
.
with_cancel
(
bg
)
wg
=
sync
.
WorkGroup
(
ctx
)
def
_
(
ctx
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment