Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
2f001009
Commit
2f001009
authored
Jun 06, 2018
by
Erin Swenson-Healey
Browse files
loosen tolerance in latency test
parent
bb9d55ac
Changes
1
Show whitespace changes
Inline
Side-by-side
p2p/net/mock/mock_test.go
View file @
2f001009
...
...
@@ -631,7 +631,8 @@ func TestStreamsWithLatency(t *testing.T) {
wg
.
Wait
()
delta
:=
time
.
Since
(
checkpoint
)
if
!
within
(
delta
,
latency
,
time
.
Millisecond
*
50
)
{
t
.
Fatalf
(
"Expected write to take ~%s, but took %s"
,
latency
.
String
(),
delta
.
String
())
tolerance
:=
time
.
Millisecond
*
100
if
!
within
(
delta
,
latency
,
tolerance
)
{
t
.
Fatalf
(
"Expected write to take ~%s (+/- %s), but took %s"
,
latency
.
String
(),
tolerance
.
String
(),
delta
.
String
())
}
}
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