[ARVADOS] updated: 50419ea603e697dd53690842a07a279577d1ca68
git at public.curoverse.com
git at public.curoverse.com
Fri Jul 17 16:05:29 EDT 2015
Summary of changes:
services/datamanager/keep/keep.go | 9 ++++++---
services/datamanager/keep/keep_test.go | 3 ++-
2 files changed, 8 insertions(+), 4 deletions(-)
via 50419ea603e697dd53690842a07a279577d1ca68 (commit)
from 91b7b7fd54c4728ac6cf12181efc1fed60157ecb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 50419ea603e697dd53690842a07a279577d1ca68
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Jul 17 16:06:10 2015 -0400
6221: SendTrashLists only return non-nil array on error.
diff --git a/services/datamanager/keep/keep.go b/services/datamanager/keep/keep.go
index c2c85fb..0e3cc1d 100644
--- a/services/datamanager/keep/keep.go
+++ b/services/datamanager/keep/keep.go
@@ -462,7 +462,7 @@ type TrashRequest struct {
type TrashList []TrashRequest
-func SendTrashLists(dataManagerToken string, kc *keepclient.KeepClient, spl map[string]TrashList) (err []error) {
+func SendTrashLists(dataManagerToken string, kc *keepclient.KeepClient, spl map[string]TrashList) (errs []error) {
count := 0
barrier := make(chan error)
@@ -513,8 +513,11 @@ func SendTrashLists(dataManagerToken string, kc *keepclient.KeepClient, spl map[
}
for i := 0; i < count; i += 1 {
- err = append(err, <-barrier)
+ b := <-barrier
+ if b != nil {
+ errs = append(errs, b)
+ }
}
- return err
+ return errs
}
diff --git a/services/datamanager/keep/keep_test.go b/services/datamanager/keep/keep_test.go
index 08de024..f39463e 100644
--- a/services/datamanager/keep/keep_test.go
+++ b/services/datamanager/keep/keep_test.go
@@ -42,7 +42,7 @@ func (s *KeepSuite) TestSendTrashLists(c *C) {
err := SendTrashLists("", &kc, tl)
server.Close()
- c.Check(err[0], IsNil)
+ c.Check(err, IsNil)
c.Check(th.request,
DeepEquals,
@@ -68,6 +68,7 @@ func sendTrashListError(c *C, server *httptest.Server) {
err := SendTrashLists("", &kc, tl)
+ c.Check(err, NotNil)
c.Check(err[0], NotNil)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list