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
d2fdb46c
Commit
d2fdb46c
authored
Jun 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
64cd8ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+11
-10
No files found.
wcfs/wcfs_test.py
View file @
d2fdb46c
...
...
@@ -573,7 +573,8 @@ class tFile:
# XXX hack - wlinks are notified and emit events simultaneously - we
# check only that events begin and end with read pre/post and that pins
# are inside. Better do explicit check in tracetest style.
# are inside (i.e. read is stuck until pins are acknowledged).
# Better do explicit check in tracetest style.
assert
ev
[
0
]
==
'read pre'
,
ev
assert
ev
[
-
1
]
==
'read '
+
dataok
[
0
],
ev
ev
=
ev
[
1
:
-
1
]
...
...
@@ -1251,7 +1252,8 @@ def test_wcfs():
print
(
'
\
n
\
n
\
n
\
n
WATCH+COMMIT
\
n
\
n
'
)
# watched + commit -> read -> receive pin messages; read is stuck until pins are acknowledged
# watched + commit -> read -> receive pin messages.
# read vs pin ordering is checked by assertBlk.
wl3
=
t
.
openwatch
();
wl3
.
watch
(
zf
,
at3
);
assert
at3
==
t
.
head
assert
set
(
wl3
.
_watching
.
keys
())
==
{
zf
}
w3
=
wl3
.
_watching
[
zf
]
...
...
@@ -1294,7 +1296,6 @@ def test_wcfs():
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
# blk4 is hole @head - the same as at earlier db view - not pinned
# XXX or do not allow hole past .size ?
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
...
...
@@ -1313,28 +1314,28 @@ def test_wcfs():
t
.
dump_history
()
wl3_
.
stop_watch
(
zf
)
# w3_ should not be notified
wl2
.
close
()
# wl2:* should not be notified
because it was closed
wl2
.
close
()
# wl2:* should not be notified
def
w_assertPin
(
pinw3
):
assert
w3
.
pinned
==
pinw3
assert
w3_
.
pinned
==
{};
assert
w3_
.
at
==
z64
# wl3_ unsubscribed from zf
assert
w2
.
pinned
==
{};
assert
w2
.
at
==
z64
# wl2 closed
f
.
assertBlk
(
0
,
''
,
{
wl3
:
{},
wl3_
:
{}})
# no change
f
.
assertBlk
(
0
,
''
,
{
wl3
:
{},
wl3_
:
{}})
# no change
w_assertPin
(
{
2
:
at3
,
5
:
at0
})
f
.
assertBlk
(
1
,
''
,
{
wl3
:
{},
wl3_
:
{}})
f
.
assertBlk
(
1
,
''
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
5
:
at0
})
f
.
assertBlk
(
2
,
'c5'
,
{
wl3
:
{},
wl3_
:
{}})
# blk2 already pinned on wl3
f
.
assertBlk
(
2
,
'c5'
,
{
wl3
:
{},
wl3_
:
{}})
# blk2 already pinned on wl3
w_assertPin
(
{
2
:
at3
,
5
:
at0
})
f
.
assertBlk
(
3
,
'd5'
,
{
wl3
:
{
3
:
at2
},
wl3_
:
{}})
# wl3_ not notified
f
.
assertBlk
(
3
,
'd5'
,
{
wl3
:
{
3
:
at2
},
wl3_
:
{}})
# wl3_ not notified
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
5
:
at0
})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{}})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
5
:
at0
})
f
.
assertBlk
(
5
,
'f4'
,
{
wl3
:
{},
wl3_
:
{}})
f
.
assertBlk
(
5
,
'f4'
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
5
:
at0
})
# XXX advance watch - receives new pins/unpins to @head
...
...
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