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
5d32b4b0
Commit
5d32b4b0
authored
Jun 16, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
54c1e3b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
wcfs/testprog/treegen.py
wcfs/testprog/treegen.py
+1
-1
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+10
-10
No files found.
wcfs/testprog/treegen.py
View file @
5d32b4b0
...
...
@@ -161,7 +161,7 @@ class ZCtx(object):
valdict
=
zctx
.
root
.
get
(
'treegen/values'
,
None
)
if
valdict
is
None
:
valdict
=
zctx
.
root
[
'treegen/values'
]
=
PersistentMapping
()
valv
=
b'abcdefgh'
valv
=
b'abcdefgh
ij
'
for
v
in
valv
:
zblk
=
valdict
.
get
(
v
,
None
)
if
zblk
is
not
None
and
zblk
.
loadblkdata
()
==
v
:
...
...
wcfs/δbtail_test.go
View file @
5d32b4b0
...
...
@@ -475,7 +475,7 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
d12
:=
kvdiff
(
xkvFlatten
(
xkv1
),
xkvFlatten
(
xkv2
))
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 + kv2 + ∞
allKeys
:=
SetKey
{}
allKeys
:=
SetKey
{}
;
allKeys
.
Add
(
kInf
)
// ∞ simulating ZBigFile.Size() query
maxk1
:=
-
kInf
;
maxk2
:=
-
kInf
for
_
,
b
:=
range
xkv1
{
for
k
:=
range
b
.
kv
{
allKeys
.
Add
(
k
)
...
...
@@ -500,22 +500,20 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
for
k
:=
range
allKeys
{
ka
:=
SetKey
{}
/* XXX wrong
b := xkv1.Get(k)
for k_ := range allKeys {
if b.lo <= k_ && k_ < b.hi {
ka.Add(k_)
}
k1
:=
k
k2
:=
k
if
k
==
kInf
{
k1
=
maxk1
k2
=
maxk2
}
*/
for
k_
:=
range
xkv1
.
Get
(
k
)
.
kv
{
for
k_
:=
range
xkv1
.
Get
(
k
1
)
.
kv
{
ka
.
Add
(
k_
)
for
k__
:=
range
xkv2
.
Get
(
k_
)
.
kv
{
ka
.
Add
(
k__
)
}
}
for
k_
:=
range
xkv2
.
Get
(
k
)
.
kv
{
for
k_
:=
range
xkv2
.
Get
(
k
2
)
.
kv
{
ka
.
Add
(
k_
)
for
k__
:=
range
xkv1
.
Get
(
k_
)
.
kv
{
ka
.
Add
(
k__
)
...
...
@@ -525,12 +523,14 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
kadj
[
k
]
=
ka
}
/*
// k=∞ simulating ZBigFile.Size() query
allKeys.Add(kInf)
allKeyv = append(allKeyv, kInf)
kadj[kInf] = SetKey{}
for k_ := range xkv1.Get(maxk1).kv { kadj[kInf].Add(k_) }
for k_ := range xkv2.Get(maxk2).kv { kadj[kInf].Add(k_) }
*/
if
kadjOK
!=
nil
&&
!
reflect
.
DeepEqual
(
kadj
,
kadjOK
)
{
panic
(
fmt
.
Sprintf
(
"BUG: %s: computed kadj is wrong:
\n
kadjOK: %v
\n
kadj : %v
\n
"
,
subj
,
kadjOK
,
kadj
))
...
...
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