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
d8939f4d
Commit
d8939f4d
authored
Jun 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
05974da5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+17
-4
No files found.
wcfs/δbtail_test.go
View file @
d8939f4d
...
@@ -533,6 +533,8 @@ func TestΔBTail(t *testing.T) {
...
@@ -533,6 +533,8 @@ func TestΔBTail(t *testing.T) {
// Verify ΔBtail on tree topologies generated by AllStructs.
// Verify ΔBtail on tree topologies generated by AllStructs.
func
TestΔBTreeAllStructs
(
t
*
testing
.
T
)
{
func
TestΔBTreeAllStructs
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
// considerations:
// considerations:
// - depth↑ better for testing (more tricky topologies)
// - depth↑ better for testing (more tricky topologies)
// - nsplit↑ not so better for testing (leave s=1, max s=2)
// - nsplit↑ not so better for testing (leave s=1, max s=2)
...
@@ -550,6 +552,12 @@ func TestΔBTreeAllStructs(t *testing.T) {
...
@@ -550,6 +552,12 @@ func TestΔBTreeAllStructs(t *testing.T) {
maxsplit
:=
1
// XXX -> 2?
maxsplit
:=
1
// XXX -> 2?
n
:=
10
// XXX -> more?
n
:=
10
// XXX -> more?
// server to generate AllStructs(kv1, kv2, ...)
sg
,
err
:=
StartAllStructsSrv
();
X
(
err
)
defer
func
()
{
err
:=
sg
.
Close
();
X
(
err
)
}()
// random seed
// random seed
seed
:=
time
.
Now
()
.
UnixNano
()
seed
:=
time
.
Now
()
.
UnixNano
()
seeds
:=
os
.
Getenv
(
"DBTail_SEED"
)
seeds
:=
os
.
Getenv
(
"DBTail_SEED"
)
...
@@ -597,11 +605,16 @@ func TestΔBTreeAllStructs(t *testing.T) {
...
@@ -597,11 +605,16 @@ func TestΔBTreeAllStructs(t *testing.T) {
for
k
:=
range
keys1
{
kv1
[
Key
(
k
)]
=
randv
()
}
for
k
:=
range
keys1
{
kv1
[
Key
(
k
)]
=
randv
()
}
for
k
:=
range
keys2
{
kv2
[
Key
(
k
)]
=
randv
()
}
for
k
:=
range
keys2
{
kv2
[
Key
(
k
)]
=
randv
()
}
// given (kv1, kv2) test on automatically generated (tree1 -> tree2)
// given (kv1, kv2) - test on automatically generated (tree1 -> tree2)
//reqSeed = rng.Int63()
reqSeed
:=
rng
.
Int63
()
fmt
.
Printf
(
"%s -> %s
\n
"
,
kvtxt
(
kv1
),
kvtxt
(
kv2
))
treev
,
err
:=
sg
.
AllStructs
(
kv1
,
kv2
,
maxdepth
,
maxsplit
,
n
,
reqSeed
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
//testq <- ...
for
_
,
tree
:=
range
treev
{
testq
<-
tree
}
}
}
}()
}()
...
...
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