mirror of
https://github.com/golang/go
synced 2024-11-12 09:30:25 -07:00
netchan: Avoid race condition in test.
Make sure we export the channels before we try to import them. R=r CC=golang-dev https://golang.org/cl/4077046
This commit is contained in:
parent
f626696d21
commit
9a9c156a00
@ -395,7 +395,7 @@ func TestCrossConnect(t *testing.T) {
|
||||
t.Fatal("new importer:", err)
|
||||
}
|
||||
|
||||
go crossExport(e1, e2, t)
|
||||
crossExport(e1, e2, t)
|
||||
crossImport(i1, i2, t)
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ func crossExport(e1, e2 *Exporter, t *testing.T) {
|
||||
t.Fatal("exportReceive:", err)
|
||||
}
|
||||
|
||||
crossLoop("export", s, r, t)
|
||||
go crossLoop("export", s, r, t)
|
||||
}
|
||||
|
||||
// Import side of cross-traffic.
|
||||
|
Loading…
Reference in New Issue
Block a user