projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12033: browserify is needed in production env, for package-building.
[arvados.git]
/
services
/
keepstore
/
s3_volume_test.go
diff --git
a/services/keepstore/s3_volume_test.go
b/services/keepstore/s3_volume_test.go
index 3fc56391ccf78a0daf71138a111d831d78aca152..3d4a1956230473e264c3b22fc8d5db112b22160f 100644
(file)
--- a/
services/keepstore/s3_volume_test.go
+++ b/
services/keepstore/s3_volume_test.go
@@
-1,3
+1,7
@@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
import (
package main
import (
@@
-174,11
+178,11
@@
func (s *StubbedS3Suite) testContextCancel(c *check.C, testFunc func(context.Con
handler.unblock = make(chan struct{})
defer close(handler.unblock)
handler.unblock = make(chan struct{})
defer close(handler.unblock)
- done
Get
:= make(chan struct{})
+ done
Func
:= make(chan struct{})
go func() {
err := testFunc(ctx, v)
c.Check(err, check.Equals, context.Canceled)
go func() {
err := testFunc(ctx, v)
c.Check(err, check.Equals, context.Canceled)
- close(done
Get
)
+ close(done
Func
)
}()
timeout := time.After(10 * time.Second)
}()
timeout := time.After(10 * time.Second)
@@
-187,9
+191,9
@@
func (s *StubbedS3Suite) testContextCancel(c *check.C, testFunc func(context.Con
// Get() is waiting for an s3 operation.
select {
case <-timeout:
// Get() is waiting for an s3 operation.
select {
case <-timeout:
- c.Fatal("timed out waiting for
Get
to call our handler")
- case <-done
Get
:
- c.Fatal("
Get finished without
calling our handler!")
+ c.Fatal("timed out waiting for
test func
to call our handler")
+ case <-done
Func
:
+ c.Fatal("
test func finished without even
calling our handler!")
case <-handler.requested:
}
case <-handler.requested:
}
@@
-198,7
+202,7
@@
func (s *StubbedS3Suite) testContextCancel(c *check.C, testFunc func(context.Con
select {
case <-timeout:
c.Fatal("timed out")
select {
case <-timeout:
c.Fatal("timed out")
- case <-done
Get
:
+ case <-done
Func
:
}
}
}
}
@@
-451,7
+455,11
@@
func (v *TestableS3Volume) Start() error {
func (v *TestableS3Volume) PutRaw(loc string, block []byte) {
err := v.bucket.Put(loc, block, "application/octet-stream", s3ACL, s3.Options{})
if err != nil {
func (v *TestableS3Volume) PutRaw(loc string, block []byte) {
err := v.bucket.Put(loc, block, "application/octet-stream", s3ACL, s3.Options{})
if err != nil {
- log.Printf("PutRaw: %+v", err)
+ log.Printf("PutRaw: %s: %+v", loc, err)
+ }
+ err = v.bucket.Put("recent/"+loc, nil, "application/octet-stream", s3ACL, s3.Options{})
+ if err != nil {
+ log.Printf("PutRaw: recent/%s: %+v", loc, err)
}
}
}
}