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
9b33e0e3
Commit
9b33e0e3
authored
Oct 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7f7242ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+27
-27
No files found.
wcfs/wcfs_test.py
View file @
9b33e0e3
...
...
@@ -1626,30 +1626,30 @@ def test_wcfs_watch_vs_access():
assert
w2
.
pinned
==
pinw2
f
.
assertCache
([
1
,
1
,
1
,
1
,
0
,
0
])
at4
=
t
.
commit
(
zf
,
{
2
:
'c4'
,
5
:
'f4'
,
6
:
'g4'
})
# FIXME + b4 after δbtree works + update vvv
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
,
0
])
at4
=
t
.
commit
(
zf
,
{
1
:
'b4'
,
2
:
'c4'
,
5
:
'f4'
,
6
:
'g4'
})
f
.
assertCache
([
1
,
0
,
0
,
1
,
0
,
0
,
0
])
f
.
assertBlk
(
0
,
'a3'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{},
{},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
0
,
'a3'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{},
{},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
1
,
'
'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{
}})
w_assertPin
(
{
},
{},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
1
,
'
b4'
,
{
wl3
:
{
1
:
at0
},
wl3_
:
{
1
:
at0
},
wl2
:
{
1
:
at0
}})
w_assertPin
(
{
1
:
at0
},
{
1
:
at0
},
{
0
:
at0
,
1
:
at0
,
2
:
at2
})
f
.
assertBlk
(
2
,
'c4'
,
{
wl3
:
{
2
:
at3
},
wl3_
:
{
2
:
at3
},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
2
,
'c4'
,
{
wl3
:
{
2
:
at3
},
wl3_
:
{
2
:
at3
},
wl2
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
},
{
1
:
at0
,
2
:
at3
},
{
0
:
at0
,
1
:
at0
,
2
:
at2
})
f
.
assertBlk
(
3
,
'd2'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
3
,
'd2'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
},
{
1
:
at0
,
2
:
at3
},
{
0
:
at0
,
1
:
at0
,
2
:
at2
})
# blk4 is hole @head - the same as at earlier db view - not pinned
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
0
:
at0
,
2
:
at2
})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
},
{
1
:
at0
,
2
:
at3
},
{
0
:
at0
,
1
:
at0
,
2
:
at2
})
# f(5) is kept unaccessed (see ^^^)
assert
f
.
cached
()[
5
]
==
0
f
.
assertBlk
(
6
,
'g4'
,
{
wl3
:
{
6
:
at0
},
wl3_
:
{
6
:
at0
},
wl2
:
{
6
:
at0
}})
# XXX at0->ø?
w_assertPin
(
{
2
:
at3
,
6
:
at0
},
{
2
:
at3
,
6
:
at0
},
{
0
:
at0
,
2
:
at2
,
6
:
at0
})
f
.
assertBlk
(
6
,
'g4'
,
{
wl3
:
{
6
:
at0
},
wl3_
:
{
6
:
at0
},
wl2
:
{
6
:
at0
}})
# XXX at0->ø?
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
6
:
at0
},
{
1
:
at0
,
2
:
at3
,
6
:
at0
},
{
0
:
at0
,
1
:
at0
,
2
:
at2
,
6
:
at0
})
# commit again:
# - c(2) is already pinned -> wl3 not notified
...
...
@@ -1667,32 +1667,32 @@ def test_wcfs_watch_vs_access():
assert
w3_
.
pinned
==
{};
assert
w3_
.
at
==
z64
# wl3_ unsubscribed from zf
assert
w2
.
pinned
==
{};
assert
w2
.
at
==
z64
# wl2 closed
f
.
assertBlk
(
0
,
'a3'
,
{
wl3
:
{},
wl3_
:
{}})
# no change
w_assertPin
(
{
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
0
,
'a3'
,
{
wl3
:
{},
wl3_
:
{}})
# no change
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
1
,
'
'
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
1
,
'
b4'
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
2
,
'c5'
,
{
wl3
:
{},
wl3_
:
{}})
# c(2) already pinned on wl3
w_assertPin
(
{
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
2
,
'c5'
,
{
wl3
:
{},
wl3_
:
{}})
# c(2) already pinned on wl3
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
6
:
at0
})
f
.
assertBlk
(
3
,
'd5'
,
{
wl3
:
{
3
:
at2
},
wl3_
:
{}})
# d(3) was not pinned on wl3; wl3_ not notified
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
6
:
at0
})
f
.
assertBlk
(
3
,
'd5'
,
{
wl3
:
{
3
:
at2
},
wl3_
:
{}})
# d(3) was not pinned on wl3; wl3_ not notified
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
3
:
at2
,
6
:
at0
})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
6
:
at0
})
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
3
:
at2
,
6
:
at0
})
# f(5) is kept still unaccessed (see ^^^)
assert
f
.
cached
()[
5
]
==
0
f
.
assertBlk
(
6
,
'g4'
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
2
:
at3
,
3
:
at2
,
6
:
at0
})
f
.
assertBlk
(
6
,
'g4'
,
{
wl3
:
{},
wl3_
:
{}})
w_assertPin
(
{
1
:
at0
,
2
:
at3
,
3
:
at2
,
6
:
at0
})
# advance watch - receives new pins/unpins to @head.
# this is also tested ^^^ in `at_i -> at_j -> ...` watch setup/adjust.
# NOTE f(5) is not affected because it was not pinned previously.
wl3
.
watch
(
zf
,
at4
,
{
2
:
at4
,
6
:
None
})
# at3 -> at4
wl3
.
watch
(
zf
,
at4
,
{
1
:
None
,
2
:
at4
,
6
:
None
})
# at3 -> at4
w_assertPin
(
{
2
:
at4
,
3
:
at2
})
# access f(5) -> wl3 should be correctly pinned
...
...
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