Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-flatfs
Commits
60a13511
Commit
60a13511
authored
Jan 19, 2017
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup. Re-lower the tolerance in TestNoCluster,
parent
653c9af9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
flatfs_test.go
flatfs_test.go
+2
-2
No files found.
flatfs_test.go
View file @
60a13511
...
...
@@ -464,7 +464,7 @@ func TestNoCluster(t *testing.T) {
t
.
Fatalf
(
"New fail: %v
\n
"
,
err
)
}
r
:=
rand
.
New
(
rand
.
NewSource
(
time
.
Now
()
.
UnixNano
()
))
r
:=
rand
.
New
(
rand
.
NewSource
(
0
))
N
:=
3200
// should be divisible by 32 so the math works out
for
i
:=
0
;
i
<
N
;
i
++
{
blk
:=
make
([]
byte
,
1000
)
...
...
@@ -482,7 +482,7 @@ func TestNoCluster(t *testing.T) {
t
.
Fatalf
(
"ReadDir fail: %v
\n
"
,
err
)
}
idealFilesPerDir
:=
float64
(
N
)
/
32.0
tolerance
:=
math
.
Floor
(
idealFilesPerDir
*
0.5
0
)
tolerance
:=
math
.
Floor
(
idealFilesPerDir
*
0.
2
5
)
count
:=
0
for
_
,
dir
:=
range
dirs
{
if
dir
.
Name
()
==
flatfs
.
SHARDING_FN
||
dir
.
Name
()
==
flatfs
.
README_FN
{
...
...
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