Commit e8176894 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 81efe5bd
...@@ -26,7 +26,7 @@ import ( ...@@ -26,7 +26,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"golang.org/x/sync/errgroup" "../../../xcommon/xsync"
"lab.nexedi.com/kirr/go123/exc" "lab.nexedi.com/kirr/go123/exc"
) )
...@@ -110,10 +110,8 @@ func TestPipeNet(t *testing.T) { ...@@ -110,10 +110,8 @@ func TestPipeNet(t *testing.T) {
l1 := xlisten(, "") l1 := xlisten(, "")
assertEq(t, l1.Addr(), addr("α:0")) assertEq(t, l1.Addr(), addr("α:0"))
// XXX -> use workGroup (in connection_test.go) wg := &xsync.WorkGroup{}
wg := &errgroup.Group{} wg.Gox(func() {
wg.Go(func() error {
return exc.Runx(func() {
c1s := xaccept(l1) c1s := xaccept(l1)
assertEq(t, c1s.LocalAddr(), addr("α:1")) assertEq(t, c1s.LocalAddr(), addr("α:1"))
assertEq(t, c1s.RemoteAddr(), addr("β:0")) assertEq(t, c1s.RemoteAddr(), addr("β:0"))
...@@ -128,7 +126,6 @@ func TestPipeNet(t *testing.T) { ...@@ -128,7 +126,6 @@ func TestPipeNet(t *testing.T) {
assertEq(t, xread(c2s), "hello") assertEq(t, xread(c2s), "hello")
xwrite(c2s, "world") xwrite(c2s, "world")
}) })
})
c1c := xdial(, "α:0") c1c := xdial(, "α:0")
assertEq(t, c1c.LocalAddr(), addr("β:0")) assertEq(t, c1c.LocalAddr(), addr("β:0"))
......
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