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
d4853cc9
Commit
d4853cc9
authored
Jun 01, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8f4b1740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+4
-4
No files found.
wcfs/δbtail_test.go
View file @
d4853cc9
...
@@ -125,7 +125,7 @@ func (tg *TreeGen) Close() (err error) {
...
@@ -125,7 +125,7 @@ func (tg *TreeGen) Close() (err error) {
return
xerr
.
Merge
(
err1
,
err2
,
err3
)
return
xerr
.
Merge
(
err1
,
err2
,
err3
)
}
}
// Commit creates new commit with underlying tree changed to tree topology.
// Commit creates new commit with underlying tree changed to
specified
tree topology.
func
(
tg
*
TreeGen
)
Commit
(
tree
string
)
(
_
zodb
.
Tid
,
err
error
)
{
func
(
tg
*
TreeGen
)
Commit
(
tree
string
)
(
_
zodb
.
Tid
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"treegen %s: commit %s"
,
tg
.
zurl
,
tree
)
defer
xerr
.
Contextf
(
&
err
,
"treegen %s: commit %s"
,
tg
.
zurl
,
tree
)
...
@@ -194,7 +194,7 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) map[Key]string {
...
@@ -194,7 +194,7 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) map[Key]string {
return
kv
return
kv
}
}
// XGetKV translates {k -> <oid>} to {k -> ZBlk(oid).data} according to db@at.
// XGetKV translates {k -> <oid>} to {k -> ZBlk(oid).data} according to db@at
snapshot
.
func
XGetKV
(
db
*
zodb
.
DB
,
at
zodb
.
Tid
,
kvOid
map
[
Key
]
Value
)
map
[
Key
]
string
{
func
XGetKV
(
db
*
zodb
.
DB
,
at
zodb
.
Tid
,
kvOid
map
[
Key
]
Value
)
map
[
Key
]
string
{
defer
exc
.
Contextf
(
"%s: @%s: get kv %v"
,
db
.
Storage
()
.
URL
(),
at
,
kvOid
)
defer
exc
.
Contextf
(
"%s: @%s: get kv %v"
,
db
.
Storage
()
.
URL
(),
at
,
kvOid
)
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
...
@@ -242,13 +242,13 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
...
@@ -242,13 +242,13 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
keys
.
Add
(
allKeyv
[
idx
])
keys
.
Add
(
allKeyv
[
idx
])
}
}
xverifyΔBTail1
(
t
,
subj
,
db
,
treeRoot
,
at1
,
at2
,
kv1
,
kv2
,
d12
,
δZ
,
keys
)
xverifyΔBTail1
(
t
,
subj
,
db
,
treeRoot
,
at1
,
at2
,
d12
,
δZ
,
keys
)
}
}
}
}
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys.
// tracked state defined by initialTrackedKeys.
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
kv1
,
kv2
,
d12
map
[
Key
]
string
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
)
{
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
d12
map
[
Key
]
string
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
assert
:=
require
.
New
(
t
)
assert
:=
require
.
New
(
t
)
...
...
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