[ARVADOS] created: 37d19a49d22a7d0ae7b4848135fb5df5128d4847

git at public.curoverse.com git at public.curoverse.com
Mon Oct 12 13:31:46 EDT 2015


        at  37d19a49d22a7d0ae7b4848135fb5df5128d4847 (commit)


commit 37d19a49d22a7d0ae7b4848135fb5df5128d4847
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 12 13:41:04 2015 -0400

    7167: Propagate read errors to caller. Fixes failing TestTransferShortBuffer.

diff --git a/sdk/go/streamer/streamer_test.go b/sdk/go/streamer/streamer_test.go
index 853d7d3..80aeb26 100644
--- a/sdk/go/streamer/streamer_test.go
+++ b/sdk/go/streamer/streamer_test.go
@@ -251,6 +251,7 @@ func (s *StandaloneSuite) TestTransferShortBuffer(c *C) {
 
 	n, err := sr.Read(out)
 	c.Check(n, Equals, 100)
+	c.Check(err, IsNil)
 
 	n, err = sr.Read(out)
 	c.Check(n, Equals, 0)
diff --git a/sdk/go/streamer/transfer.go b/sdk/go/streamer/transfer.go
index a4a194f..3f5f934 100644
--- a/sdk/go/streamer/transfer.go
+++ b/sdk/go/streamer/transfer.go
@@ -249,9 +249,7 @@ func (this *AsyncStream) transfer(source_reader io.Reader) {
 					}
 				}
 			} else {
-				if reader_status == io.EOF {
-					// no more reads expected, so this is ok
-				} else {
+				if reader_status == nil {
 					// slices channel closed without signaling EOF
 					reader_status = io.ErrUnexpectedEOF
 				}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list