[ARVADOS] updated: f891b240e485022482c845efeffb625a31021c0d

Git user git at public.curoverse.com
Tue Mar 15 11:27:22 EDT 2016


Summary of changes:
 services/keepstore/volume_generic_test.go | 70 -------------------------------
 1 file changed, 70 deletions(-)

       via  f891b240e485022482c845efeffb625a31021c0d (commit)
      from  00a96a5bd0203a1330963aaa3b7c3f5a2f970438 (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 f891b240e485022482c845efeffb625a31021c0d
Author: radhika <radhika at curoverse.com>
Date:   Tue Mar 15 11:27:08 2016 -0400

    8554: removed testTrashUntrashWithEmptyTrashGoroutine

diff --git a/services/keepstore/volume_generic_test.go b/services/keepstore/volume_generic_test.go
index be83151..c9eb096 100644
--- a/services/keepstore/volume_generic_test.go
+++ b/services/keepstore/volume_generic_test.go
@@ -79,7 +79,6 @@ func DoGenericVolumeTests(t TB, factory TestableVolumeFactory) {
 
 	testTrashUntrash(t, factory)
 	testTrashEmptyTrashUntrash(t, factory)
-	testTrashUntrashWithEmptyTrashGoroutine(t, factory)
 }
 
 // Put a test block, get it and verify content
@@ -952,72 +951,3 @@ func testTrashEmptyTrashUntrash(t TB, factory TestableVolumeFactory) {
 	}
 	bufs.Put(buf)
 }
-
-// With trashLifetime = 1ns, perform:
-// Run emptyTrash goroutine
-// Trash an old block - which either raises ErrNotImplemented or succeeds
-// Untrash - after emptyTrash goroutine ticks, and hence does not actually untrash
-// Get - which must fail to find the block
-func testTrashUntrashWithEmptyTrashGoroutine(t TB, factory TestableVolumeFactory) {
-	v := factory(t)
-	defer v.Teardown()
-
-	doneEmptyingTrash := make(chan bool)
-	defer func() {
-		trashLifetime = 0 * time.Second
-		doneEmptyingTrash <- true
-	}()
-
-	volumes = append(volumes, v)
-
-	trashLifetime = 1 * time.Nanosecond
-	trashCheckInterval = 1 * time.Nanosecond
-
-	go emptyTrash(doneEmptyingTrash, trashCheckInterval)
-
-	// Trash old block and untrash a little after first trashCheckInterval
-	v.PutRaw(TestHash, TestBlock)
-	v.TouchWithDate(TestHash, time.Now().Add(-2*blobSignatureTTL))
-
-	buf, err := v.Get(TestHash)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if bytes.Compare(buf, TestBlock) != 0 {
-		t.Fatalf("Got data %+q, expected %+q", buf, TestBlock)
-	}
-	bufs.Put(buf)
-
-	// Trash
-	err = v.Trash(TestHash)
-	if err == MethodDisabledError || err == ErrNotImplemented {
-		return
-	}
-
-	_, err = v.Get(TestHash)
-	if err == nil || !os.IsNotExist(err) {
-		t.Fatalf("os.IsNotExist(%v) should have been true", err)
-	}
-
-	time.Sleep(2 * time.Nanosecond)
-
-	// Untrash
-	err = v.Untrash(TestHash)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// Get is expected to fail due to EmptyTrash before Untrash
-	// It is still found on readonly volumes
-	buf, err = v.Get(TestHash)
-	if err != nil {
-		if !os.IsNotExist(err) {
-			t.Errorf("os.IsNotExist(%v) should have been true", err)
-		}
-	} else {
-		if bytes.Compare(buf, TestBlock) != 0 {
-			t.Errorf("Got data %+q, expected %+q", buf, TestBlock)
-		}
-		bufs.Put(buf)
-	}
-}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list