projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3036: Fix merge conflicts. One python sdk test still fails.
[arvados.git]
/
services
/
keepstore
/
keepstore_test.go
diff --git
a/services/keepstore/keepstore_test.go
b/services/keepstore/keepstore_test.go
index 2b7e411aaf1f8c560da93af7fb4c770b60363fde..686f502500cec1e6e7ad3508f2978ef55522a6dc 100644
(file)
--- a/
services/keepstore/keepstore_test.go
+++ b/
services/keepstore/keepstore_test.go
@@
-266,12
+266,13
@@
func TestPutBlockTouchFails(t *testing.T) {
t.Fatalf("vols[0].Mtime(%s): %s\n", TEST_HASH, err)
}
t.Fatalf("vols[0].Mtime(%s): %s\n", TEST_HASH, err)
}
- // Mark the volume bad and call PutBlock.
- vols[0].(*MockVolume).Bad = true
+ // vols[0].Touch will fail on the next call, so the volume
+ // manager will store a copy on vols[1] instead.
+ vols[0].(*MockVolume).Touchable = false
if err := PutBlock(TEST_BLOCK, TEST_HASH); err != nil {
t.Fatalf("PutBlock: %v", err)
}
if err := PutBlock(TEST_BLOCK, TEST_HASH); err != nil {
t.Fatalf("PutBlock: %v", err)
}
- vols[0].(*MockVolume).
Bad = fals
e
+ vols[0].(*MockVolume).
Touchable = tru
e
// Now the mtime on the block on vols[0] should be unchanged, and
// there should be a copy of the block on vols[1].
// Now the mtime on the block on vols[0] should be unchanged, and
// there should be a copy of the block on vols[1].
@@
-280,7
+281,7
@@
func TestPutBlockTouchFails(t *testing.T) {
t.Fatalf("vols[0].Mtime(%s): %s\n", TEST_HASH, err)
}
if !new_mtime.Equal(old_mtime) {
t.Fatalf("vols[0].Mtime(%s): %s\n", TEST_HASH, err)
}
if !new_mtime.Equal(old_mtime) {
- t.Errorf("
bad block mtimes do not match
:\nold_mtime = %v\nnew_mtime = %v\n",
+ t.Errorf("
mtime was changed on vols[0]
:\nold_mtime = %v\nnew_mtime = %v\n",
old_mtime, new_mtime)
}
result, err := vols[1].Get(TEST_HASH)
old_mtime, new_mtime)
}
result, err := vols[1].Get(TEST_HASH)