Commit 9a9c156a authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent f626696d
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment