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
21e6e206
Commit
21e6e206
authored
Jun 12, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8a98d791
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+19
-19
No files found.
wcfs/wcfs_test.py
View file @
21e6e206
...
...
@@ -1217,27 +1217,27 @@ 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
wl1
=
t
.
openwatch
()
wl2
=
t
.
openwatch
()
wl1
.
watch
(
zf
,
at3
);
assert
at3
==
t
.
head
wl2
.
watch
(
zf
,
at2
)
wl3
=
t
.
openwatch
();
wl3
.
watch
(
zf
,
at3
);
assert
at3
==
t
.
head
wl3_
=
t
.
openwatch
();
wl3_
.
watch
(
zf
,
at3
)
wl2
=
t
.
openwatch
();
wl2
.
watch
(
zf
,
at2
)
f
.
assertCache
([
1
,
1
,
1
,
1
])
t
.
change
(
zf
,
{
2
:
'4c'
,
5
:
'4f'
})
# FIXME + 4a after δbtree works
at4
=
t
.
commit
()
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
])
# FIXME a must be invalidated - see δbtree ^^^
f
.
assertBlk
(
0
,
''
,
{
wl
1
:
{},
wl2
:
{}})
# XXX + {0, at3} after δbtree works
f
.
assertBlk
(
1
,
''
,
{
wl
1
:
{},
wl2
:
{}})
f
.
assertBlk
(
2
,
'4c'
,
{
wl
1
:
{
2
:
at3
},
wl2
:
{}})
f
.
assertBlk
(
3
,
'2d'
,
{
wl
1
:
{},
wl2
:
{}})
f
.
assertBlk
(
0
,
''
,
{
wl
3
:
{},
wl3_
:
{},
wl2
:
{}})
# XXX + {0, at3} after δbtree
f
.
assertBlk
(
1
,
''
,
{
wl
3
:
{},
wl3_
:
{},
wl2
:
{}})
f
.
assertBlk
(
2
,
'4c'
,
{
wl
3
:
{
2
:
at3
},
wl3_
:
{
2
:
at3
},
wl2
:
{}})
f
.
assertBlk
(
3
,
'2d'
,
{
wl
3
:
{},
wl3_
:
{},
wl2
:
{}})
# blk4 is hole @head - the same as at earlier db view - not pinned
# XXX or do not allow hole past .size ?
f
.
assertBlk
(
4
,
''
,
{
wl
1
:
{},
wl2
:
{}})
f
.
assertBlk
(
5
,
'4f'
,
{
wl
1
:
{
5
:
at0
},
wl2
:
{
5
:
at0
}})
# XXX at0 -> ø XXX also triggers access to #4
?
f
.
assertBlk
(
4
,
''
,
{
wl
3
:
{},
wl3_
:
{},
wl2
:
{}})
f
.
assertBlk
(
5
,
'4f'
,
{
wl
3
:
{
5
:
at0
},
wl3_
:
{
5
:
at0
},
wl2
:
{
5
:
at0
}})
# XXX at0 -> ø
?
# commit again:
# - block is already pinned (#2) -> not notified
# - wlink closed (wl2) -> watch no longer notified this
# - watch stopped (wl3_) -> watch no longer notified
# - wlink closed (wl2) -> watch no longer notified
f
.
assertCache
([
1
,
1
,
1
,
1
,
1
,
1
])
t
.
change
(
zf
,
{
2
:
'5c'
,
3
:
'5d'
})
at5
=
t
.
commit
()
...
...
@@ -1245,19 +1245,19 @@ def test_wcfs():
t
.
dump_history
()
#wl3_.watch(zf, "-") XXX enable
wl2
.
close
()
# wl2 should not be notified because it was closed
f
.
assertBlk
(
0
,
''
,
{
wl
1
:
{}})
# no change
f
.
assertBlk
(
1
,
''
,
{
wl
1
:
{}})
f
.
assertBlk
(
2
,
'5c'
,
{
wl
1
:
{}})
# blk2 already pinned on wl1
f
.
assertBlk
(
3
,
'5d'
,
{
wl
1
:
{
3
:
at2
}})
f
.
assertBlk
(
4
,
''
,
{
wl
1
:
{}})
f
.
assertBlk
(
5
,
'4f'
,
{
wl
1
:
{}})
f
.
assertBlk
(
0
,
''
,
{
wl
3
:
{},
wl3_
:
{}})
# no change
f
.
assertBlk
(
1
,
''
,
{
wl
3
:
{},
wl3_
:
{}})
f
.
assertBlk
(
2
,
'5c'
,
{
wl
3
:
{},
wl3_
:
{}})
# blk2 already pinned on wl3
f
.
assertBlk
(
3
,
'5d'
,
{
wl
3
:
{
3
:
at2
},
wl3_
:
{}})
# wl3_ not notified
f
.
assertBlk
(
4
,
''
,
{
wl
3
:
{},
wl3_
:
{}})
f
.
assertBlk
(
5
,
'4f'
,
{
wl
3
:
{},
wl3_
:
{}})
# XXX watch with at="-" -> watch no longer notified this
# XXX 2 opened watchs for 1 file at the same time
wl
1
.
close
()
wl
3
.
close
()
# XXX commit after current file size -> watch
...
...
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