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
46c44e54
Commit
46c44e54
authored
May 31, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ee2bb183
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+9
-2
No files found.
wcfs/δbtail_test.go
View file @
46c44e54
...
@@ -222,6 +222,7 @@ func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.T
...
@@ -222,6 +222,7 @@ func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.T
txn
,
ctx
:=
transaction
.
New
(
context
.
Background
())
txn
,
ctx
:=
transaction
.
New
(
context
.
Background
())
defer
txn
.
Abort
()
defer
txn
.
Abort
()
// zconn, δbtail @at1 with initial tracked set
zconn
,
err
:=
db
.
Open
(
ctx
,
&
zodb
.
ConnOptions
{
At
:
at1
});
X
(
err
)
zconn
,
err
:=
db
.
Open
(
ctx
,
&
zodb
.
ConnOptions
{
At
:
at1
});
X
(
err
)
δbtail
:=
NewΔBtail
(
zconn
.
At
())
δbtail
:=
NewΔBtail
(
zconn
.
At
())
...
@@ -229,11 +230,15 @@ func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.T
...
@@ -229,11 +230,15 @@ func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.T
ztree
:=
xtree
.
(
*
Tree
)
ztree
:=
xtree
.
(
*
Tree
)
for
_
,
k
:=
range
initialTrackedKeys
{
for
_
,
k
:=
range
initialTrackedKeys
{
treeP
ath
:=
[]
Node
{}
p
ath
:=
[]
Node
{}
_
,
_
,
err
=
ztree
.
VGet
(
ctx
,
k
,
func
(
node
Node
)
{
_
,
_
,
err
=
ztree
.
VGet
(
ctx
,
k
,
func
(
node
Node
)
{
treePath
=
append
(
treeP
ath
,
node
)
path
=
append
(
p
ath
,
node
)
});
X
(
err
)
});
X
(
err
)
δbtail
.
Track
(
path
)
}
}
// XXX
}
}
func
TestΔBTail
(
t
*
testing
.
T
)
{
func
TestΔBTail
(
t
*
testing
.
T
)
{
...
@@ -267,6 +272,7 @@ func TestΔBTail(t *testing.T) {
...
@@ -267,6 +272,7 @@ func TestΔBTail(t *testing.T) {
err
:=
db
.
Close
();
X
(
err
)
err
:=
db
.
Close
();
X
(
err
)
}()
}()
/*
XXX := func(tree1, tree2 string) {
XXX := func(tree1, tree2 string) {
// XXX commit tree1
// XXX commit tree1
// XXX load tree1 -> get keys for kv1
// XXX load tree1 -> get keys for kv1
...
@@ -293,6 +299,7 @@ func TestΔBTail(t *testing.T) {
...
@@ -293,6 +299,7 @@ func TestΔBTail(t *testing.T) {
kv2 := XGetTree(db, tg.head, tg.treeRoot)
kv2 := XGetTree(db, tg.head, tg.treeRoot)
fmt.Println(kv2)
fmt.Println(kv2)
}
}
*/
// direct tree_i -> tree_{i+1}
// direct tree_i -> tree_{i+1}
at1
:=
tg
.
head
at1
:=
tg
.
head
...
...
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