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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
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
Show 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:
...
@@ -573,7 +573,8 @@ class tFile:
# XXX hack - wlinks are notified and emit events simultaneously - we
# XXX hack - wlinks are notified and emit events simultaneously - we
# check only that events begin and end with read pre/post and that pins
# 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
[
0
]
==
'read pre'
,
ev
assert
ev
[
-
1
]
==
'read '
+
dataok
[
0
],
ev
assert
ev
[
-
1
]
==
'read '
+
dataok
[
0
],
ev
ev
=
ev
[
1
:
-
1
]
ev
=
ev
[
1
:
-
1
]
...
@@ -1251,7 +1252,8 @@ def test_wcfs():
...
@@ -1251,7 +1252,8 @@ def test_wcfs():
print
(
'
\
n
\
n
\
n
\
n
WATCH+COMMIT
\
n
\
n
'
)
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
wl3
=
t
.
openwatch
();
wl3
.
watch
(
zf
,
at3
);
assert
at3
==
t
.
head
assert
set
(
wl3
.
_watching
.
keys
())
==
{
zf
}
assert
set
(
wl3
.
_watching
.
keys
())
==
{
zf
}
w3
=
wl3
.
_watching
[
zf
]
w3
=
wl3
.
_watching
[
zf
]
...
@@ -1294,7 +1296,6 @@ def test_wcfs():
...
@@ -1294,7 +1296,6 @@ def test_wcfs():
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
# blk4 is hole @head - the same as at earlier db view - not pinned
# 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
:
{}})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
...
@@ -1313,7 +1314,7 @@ def test_wcfs():
...
@@ -1313,7 +1314,7 @@ def test_wcfs():
t
.
dump_history
()
t
.
dump_history
()
wl3_
.
stop_watch
(
zf
)
# w3_ should not be notified
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
):
def
w_assertPin
(
pinw3
):
assert
w3
.
pinned
==
pinw3
assert
w3
.
pinned
==
pinw3
assert
w3_
.
pinned
==
{};
assert
w3_
.
at
==
z64
# wl3_ unsubscribed from zf
assert
w3_
.
pinned
==
{};
assert
w3_
.
at
==
z64
# wl3_ unsubscribed from zf
...
...
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