Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
0420eb3b
Commit
0420eb3b
authored
Dec 04, 2012
by
Alex Brainman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: report Accept error during TestVariousDeadlines1Proc test
R=golang-dev CC=golang-dev
https://golang.org/cl/6868057
parent
dfe29798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
src/pkg/net/timeout_test.go
src/pkg/net/timeout_test.go
+4
-13
No files found.
src/pkg/net/timeout_test.go
View file @
0420eb3b
...
...
@@ -410,16 +410,7 @@ func testVariousDeadlines(t *testing.T, maxProcs int) {
defer
runtime
.
GOMAXPROCS
(
runtime
.
GOMAXPROCS
(
maxProcs
))
ln
:=
newLocalListener
(
t
)
defer
ln
.
Close
()
donec
:=
make
(
chan
struct
{})
defer
close
(
donec
)
testsDone
:=
func
()
bool
{
select
{
case
<-
donec
:
return
true
}
return
false
}
acceptc
:=
make
(
chan
error
,
1
)
// The server, with no timeouts of its own, sending bytes to clients
// as fast as it can.
...
...
@@ -428,9 +419,7 @@ func testVariousDeadlines(t *testing.T, maxProcs int) {
for
{
c
,
err
:=
ln
.
Accept
()
if
err
!=
nil
{
if
!
testsDone
()
{
t
.
Fatalf
(
"Accept: %v"
,
err
)
}
acceptc
<-
err
return
}
go
func
()
{
...
...
@@ -504,6 +493,8 @@ func testVariousDeadlines(t *testing.T, maxProcs int) {
select
{
case
res
:=
<-
servec
:
t
.
Logf
(
"for %v: server in %v wrote %d, %v"
,
name
,
res
.
d
,
res
.
n
,
res
.
err
)
case
err
:=
<-
acceptc
:
t
.
Fatalf
(
"for %v: server Accept = %v"
,
name
,
err
)
case
<-
time
.
After
(
tooLong
)
:
t
.
Fatalf
(
"for %v, timeout waiting for server to finish writing"
,
name
)
}
...
...
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