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-dms3-routing
Commits
d21309d1
Commit
d21309d1
authored
Aug 23, 2015
by
rht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'ctx, _' to have explicit cancel
License: MIT Signed-off-by:
rht
<
rhtbot@gmail.com
>
parent
946e3697
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dht/ext_test.go
dht/ext_test.go
+4
-2
No files found.
dht/ext_test.go
View file @
d21309d1
...
...
@@ -202,7 +202,8 @@ func TestNotFound(t *testing.T) {
}
// long timeout to ensure timing is not at play.
ctx
,
_
=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
20
)
ctx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
20
)
defer
cancel
()
v
,
err
:=
d
.
GetValue
(
ctx
,
key
.
Key
(
"hello"
))
log
.
Debugf
(
"get value got %v"
,
v
)
if
err
!=
nil
{
...
...
@@ -274,7 +275,8 @@ func TestLessThanKResponses(t *testing.T) {
})
}
ctx
,
_
=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
30
)
ctx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
30
)
defer
cancel
()
if
_
,
err
:=
d
.
GetValue
(
ctx
,
key
.
Key
(
"hello"
));
err
!=
nil
{
switch
err
{
case
routing
.
ErrNotFound
:
...
...
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