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
Commits
4c178f87
Commit
4c178f87
authored
Oct 19, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close conns directly in tests
parent
b29367a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
net/conn/conn_test.go
net/conn/conn_test.go
+5
-1
net/conn/secure_conn_test.go
net/conn/secure_conn_test.go
+5
-1
No files found.
net/conn/conn_test.go
View file @
4c178f87
...
...
@@ -60,7 +60,9 @@ func TestCancel(t *testing.T) {
default
:
}
cancel
()
c1
.
Close
()
c2
.
Close
()
cancel
()
// listener
// wait to ensure other goroutines run and close things.
<-
time
.
After
(
time
.
Microsecond
*
10
)
...
...
@@ -113,6 +115,8 @@ func TestCloseLeak(t *testing.T) {
<-
time
.
After
(
time
.
Microsecond
*
5
)
}
c1
.
Close
()
c2
.
Close
()
cancel
()
// close the listener
wg
.
Done
()
}
...
...
net/conn/secure_conn_test.go
View file @
4c178f87
...
...
@@ -82,7 +82,9 @@ func TestSecureCancel(t *testing.T) {
default
:
}
cancel
()
c1
.
Close
()
c2
.
Close
()
cancel
()
// listener
// wait to ensure other goroutines run and close things.
<-
time
.
After
(
time
.
Microsecond
*
10
)
...
...
@@ -137,6 +139,8 @@ func TestSecureCloseLeak(t *testing.T) {
<-
time
.
After
(
time
.
Microsecond
*
5
)
}
c1
.
Close
()
c2
.
Close
()
cancel
()
// close the listener
wg
.
Done
()
}
...
...
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