[ARVADOS] updated: b10dd532008ee5ea7b994b07bb6f6e458786c0eb
git at public.curoverse.com
git at public.curoverse.com
Fri Nov 20 13:29:13 EST 2015
Summary of changes:
services/datamanager/datamanager_test.go | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
via b10dd532008ee5ea7b994b07bb6f6e458786c0eb (commit)
from 3272913e4a91f5b80b256f9f09e4d4f432d07058 (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 b10dd532008ee5ea7b994b07bb6f6e458786c0eb
Author: radhika <radhika at curoverse.com>
Date: Fri Nov 20 13:28:04 2015 -0500
7255: update TestPutAndGetCollectionsWithMultipleStreamsAndBlocks to verify that expected number of unique block locators are created.
diff --git a/services/datamanager/datamanager_test.go b/services/datamanager/datamanager_test.go
index 094cd44..983e25c 100644
--- a/services/datamanager/datamanager_test.go
+++ b/services/datamanager/datamanager_test.go
@@ -536,7 +536,7 @@ func createMultiStreamBlockCollection(t *testing.T, data string, numStreams, num
defer switchToken(arvadostest.AdminToken)()
manifest := ""
- var locators []string
+ locators := make(map[string]bool)
for s := 0; s < numStreams; s++ {
manifest += fmt.Sprintf("./stream%d ", s)
for b := 0; b < numBlocks; b++ {
@@ -544,7 +544,7 @@ func createMultiStreamBlockCollection(t *testing.T, data string, numStreams, num
if err != nil {
t.Fatalf("Error creating block %d in stream %d: %v", b, s, err)
}
- locators = append(locators, strings.Split(locator, "+A")[0])
+ locators[strings.Split(locator, "+A")[0]] = true
manifest += locator + " "
}
manifest += "0:1:dummyfile.txt\n"
@@ -559,7 +559,12 @@ func createMultiStreamBlockCollection(t *testing.T, data string, numStreams, num
t.Fatalf("Error creating collection %v", err)
}
- return collection["uuid"].(string), locators
+ var locs []string
+ for k, _ := range locators {
+ locs = append(locs, k)
+ }
+
+ return collection["uuid"].(string), locs
}
/*
@@ -585,6 +590,9 @@ func TestPutAndGetCollectionsWithMultipleStreamsAndBlocks(t *testing.T) {
if toBeDeletedCollection == "" {
t.Fatalf("Failed to create collection with 10 blocks")
}
+ if len(toBeDeletedCollectionBlocks) != 10 {
+ t.Fatalf("Not all blocks are created: expected %v, found %v", 10, len(toBeDeletedCollectionBlocks))
+ }
// create a stray block that will be backdated
strayOldBlock := putBlock(t, "this stray block is old")
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list