diff --git a/go.sum b/go.sum index f1a8fd67e..d4042cd97 100644 --- a/go.sum +++ b/go.sum @@ -118,6 +118,8 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= diff --git a/pkg/dmsg/server_test.go b/pkg/dmsg/server_test.go index 9438f5234..256d630be 100644 --- a/pkg/dmsg/server_test.go +++ b/pkg/dmsg/server_test.go @@ -719,9 +719,11 @@ func TestServer_Serve(t *testing.T) { } // block on `Write` + var blockedWriteErr error + blockedWriteDone := make(chan struct{}) go func() { - _, err = aWrTransport.Write(msg) - require.Error(t, err) + _, blockedWriteErr = aWrTransport.Write(msg) + close(blockedWriteDone) }() // wait till it's definitely blocked @@ -749,6 +751,9 @@ func TestServer_Serve(t *testing.T) { err = aWrTransport.Close() require.NoError(t, err) + <-blockedWriteDone + require.Error(t, blockedWriteErr) + err = bWrTransport.Close() require.NoError(t, err)